git ssb

30+

cel / git-ssb-web



Commit 800afbccfdb2255a0afbc2b0e0008eddd8387374

Add anchor to issue comment links

Charles Lehner committed on 4/13/2016, 2:16:03 AM
Parent: c11ca3daa98207ed3135bb82c987cf1aadb4f7ea

Files changed

index.jschanged
index.jsView
@@ -2006,11 +2006,12 @@
20062006 }
20072007
20082008 function renderIssueActivityMsg(repo, issue, type, postId, msg) {
20092009 var authorLink = link([msg.value.author], msg.authorName)
2010- var msgTimeLink = link([msg.key],
2011- new Date(msg.value.timestamp).toLocaleString(), false,
2012- 'name="' + escapeHTML(msg.key) + '"')
2010+ var msgHref = encodeLink(msg.key) + '#' + encodeURIComponent(msg.key)
2011+ var msgTimeLink = '<a href="' + msgHref + '"' +
2012+ ' name="' + escapeHTML(msg.key) + '">' +
2013+ escapeHTML(new Date(msg.value.timestamp).toLocaleString()) + '</a>'
20132014 var c = msg.value.content
20142015 switch (c.type) {
20152016 case 'post':
20162017 if (c.root == issue.id) {

Built with git-ssb-web