fix(codeSpans): add - and = to escaped chars inside code spans

This commit is contained in:
Estevao Soares dos Santos 2017-01-29 19:33:54 +00:00
parent 7d63a3e635
commit 4243a313fd
5 changed files with 1 additions and 8 deletions

BIN
dist/showdown.js vendored

Binary file not shown.

BIN
dist/showdown.js.map vendored

Binary file not shown.

BIN
dist/showdown.min.js vendored

Binary file not shown.

Binary file not shown.

View File

@ -16,14 +16,7 @@ showdown.subParser('encodeCode', function (text, options, globals) {
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
// Now, escape characters that are magic in Markdown:
.replace(/([*_{}\[\]\\])/g, showdown.helper.escapeCharactersCallback);
// jj the line above breaks this:
//---
//* Item
// 1. Subitem
// special char: *
// ---
.replace(/([*_{}\[\]\\=-])/g, showdown.helper.escapeCharactersCallback);
text = globals.converter._dispatch('encodeCode.after', text, options, globals);
return text;