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
e3ddcafd1e
commit
25c44207be
@ -14,7 +14,7 @@ showdown.subParser('encodeBackslashEscapes', function (text, options, globals) {
|
||||
text = globals.converter._dispatch('encodeBackslashEscapes.before', text, options, globals);
|
||||
|
||||
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('encodeBackslashEscapes.after', text, options, globals);
|
||||
return text;
|
||||
|
@ -0,0 +1,2 @@
|
||||
<p>[^1]:a</p>
|
||||
<p>[^1]:a</p>
|
@ -0,0 +1,3 @@
|
||||
\[^1]:a
|
||||
|
||||
[^1]\:a
|
Loading…
x
Reference in New Issue
Block a user