mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
Fixing replacement of underscores in text links by the italics
This commit is contained in:
parent
2e102c72b2
commit
1f0ebaf6e2
|
@ -508,6 +508,9 @@ var _RunSpanGamut = function(text) {
|
||||||
// Do hard breaks:
|
// Do hard breaks:
|
||||||
text = text.replace(/ +\n/g," <br />\n");
|
text = text.replace(/ +\n/g," <br />\n");
|
||||||
|
|
||||||
|
// Un-escape the escaped underscores now that italics are done
|
||||||
|
text = text.replace(/\%5F/g, '_')
|
||||||
|
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1278,6 +1281,9 @@ var _DoAutoLinks = function(text) {
|
||||||
|
|
||||||
text = text.replace(/<((https?|ftp|dict):[^'">\s]+)>/gi,"<a href=\"$1\">$1</a>");
|
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>
|
// Email addresses: <address@domain.foo>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user