Fixing replacement of underscores in text links by the italics

This commit is contained in:
Chris Sloan 2014-01-11 20:20:23 -05:00
parent 2e102c72b2
commit 1f0ebaf6e2

View File

@ -508,6 +508,9 @@ var _RunSpanGamut = function(text) {
// Do hard breaks:
text = text.replace(/ +\n/g," <br />\n");
// Un-escape the escaped underscores now that italics are done
text = text.replace(/\%5F/g, '_')
return text;
}
@ -1278,6 +1281,9 @@ var _DoAutoLinks = function(text) {
text = text.replace(/<((https?|ftp|dict):[^'">\s]+)>/gi,"<a href=\"$1\">$1</a>");
// Escape the underscores in text links temporarily
text = text.replace(/_/g,"%5F")
// Email addresses: <address@domain.foo>
/*