mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
fix: allow escaping of colons
Previously, you couldn't escape colons (as they were semi-magic markdown characters). Colons (:) can now be backslash escaped.
This commit is contained in:
parent
c7a89eaae4
commit
a4be301331
|
@ -14,7 +14,7 @@ showdown.subParser('makehtml.encodeBackslashEscapes', function (text, options, g
|
|||
text = globals.converter._dispatch('makehtml.encodeBackslashEscapes.before', text, options, globals).getText();
|
||||
|
||||
text = text.replace(/\\(\\)/g, showdown.helper.escapeCharactersCallback);
|
||||
text = text.replace(/\\([`*_{}\[\]()>#+.!~=|-])/g, showdown.helper.escapeCharactersCallback);
|
||||
text = text.replace(/\\([`*_{}\[\]()>#+.!~=|:-])/g, showdown.helper.escapeCharactersCallback);
|
||||
|
||||
text = globals.converter._dispatch('makehtml.encodeBackslashEscapes.after', text, options, globals).getText();
|
||||
return text;
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
<p>[^1]:a</p>
|
||||
<p>[^1]:a</p>
|
|
@ -0,0 +1,3 @@
|
|||
\[^1]:a
|
||||
|
||||
[^1]\:a
|
Loading…
Reference in New Issue
Block a user