diff --git a/src/subParsers/encodeBackslashEscapes.js b/src/subParsers/encodeBackslashEscapes.js index 7909ed90b..1c0876d19 100644 --- a/src/subParsers/encodeBackslashEscapes.js +++ b/src/subParsers/encodeBackslashEscapes.js @@ -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; diff --git a/test/issues/#510.specific-string-gets-removed-from-text.html b/test/issues/#510.specific-string-gets-removed-from-text.html new file mode 100644 index 000000000..a4657f157 --- /dev/null +++ b/test/issues/#510.specific-string-gets-removed-from-text.html @@ -0,0 +1,2 @@ +
[^1]:a
+[^1]:a
diff --git a/test/issues/#510.specific-string-gets-removed-from-text.md b/test/issues/#510.specific-string-gets-removed-from-text.md new file mode 100644 index 000000000..0abb73d92 --- /dev/null +++ b/test/issues/#510.specific-string-gets-removed-from-text.md @@ -0,0 +1,3 @@ +\[^1]:a + +[^1]\:a