Commit 800afbccfdb2255a0afbc2b0e0008eddd8387374
Add anchor to issue comment links
Charles Lehner committed on 4/13/2016, 2:16:03 AMParent: c11ca3daa98207ed3135bb82c987cf1aadb4f7ea
Files changed
index.js | changed |
index.js | ||
---|---|---|
@@ -2006,11 +2006,12 @@ | ||
2006 | 2006 | } |
2007 | 2007 | |
2008 | 2008 | function renderIssueActivityMsg(repo, issue, type, postId, msg) { |
2009 | 2009 | 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>' | |
2013 | 2014 | var c = msg.value.content |
2014 | 2015 | switch (c.type) { |
2015 | 2016 | case 'post': |
2016 | 2017 | if (c.root == issue.id) { |
Built with git-ssb-web