Render <a> with title and target attributes

(imported from commit 0e195db0a3ff1ebe3d567a1ab6408c4a1bfe1e2d)
This commit is contained in:
Leo Franchi 2014-01-07 16:13:46 -05:00
parent 97a69cbc12
commit 86cb451dcb
1 changed files with 7 additions and 0 deletions

View File

@ -321,6 +321,13 @@ $(function () {
+ '\n</pre></div>'; + '\n</pre></div>';
}; };
// Our links have title= and target=_blank
r.link = function (href, title, text) {
title = title || href;
var out = '<a href="' + href + '"' + ' target="_blank" title="' + title + '"' + '>' + text + '</a>';
return out;
};
// Disable ordered lists // Disable ordered lists
// We used GFM + tables, so replace the list start regex for that ruleset // We used GFM + tables, so replace the list start regex for that ruleset
// We remove the |[\d+]\. that matches the numbering in a numbered list // We remove the |[\d+]\. that matches the numbering in a numbered list