Skip to content
This repository has been archived by the owner on May 21, 2019. It is now read-only.

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
hidakatsuya committed Apr 2, 2014
1 parent 5ca44da commit 8f05945
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions assets/javascripts/link_to_issue_in_comments.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
$('.wiki-page-version .comments').each(function() {
(function() {
var comment;
var re = /#(\d+)/;
var comment = $(this).text();
if (re.test(comment)) {
$(this).html(comment.replace(re, '<a href="/issues/$1" title="Open Issue #$1">#$1</a>'));
}
});

$('.wiki-page-version .comments').each(function() {
comment = $(this).text();
if (re.test(comment)) {
$(this).html(comment.replace(re, '<a href="/issues/$1" title="Open Issue #$1">#$1</a>'));
}
});
})();

0 comments on commit 8f05945

Please sign in to comment.