Skip to content

Commit

Permalink
Merge pull request #17 from askzy/master
Browse files Browse the repository at this point in the history
make lines starting with > a ref
  • Loading branch information
mrroach9 committed Sep 27, 2013
2 parents b50493b + 2aacd6a commit 7517545
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions js/bbs/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ function getQueryString() {

function ansi2html(content) {
// add color to reference
refertitle = new RegExp('\n(【 .* 】)', 'g');
refercontent = new RegExp('\n(\: .*)', 'g');
var refertitle = new RegExp('\n(【 .* 】)', 'g');
var refercontent = new RegExp('\n(\: .*)', 'g');
var refercontent2 = new RegExp('\n(> .*)', 'g');
content = content.replace(refertitle, '\n\u001b[1;33m$1\u001b[m');
content = content.replace(refercontent, '\n\u001b[36m$1\u001b[m');
content = content.replace(refercontent2, '\n\u001b[36m$1\u001b[m');

content = html_encode(content);

Expand All @@ -75,4 +77,4 @@ function ansi2html(content) {
content = content.replace(monospacett, '</tt>\n<tt>');

return content;
}
}

0 comments on commit 7517545

Please sign in to comment.