Skip to content

Commit

Permalink
fix(codeSpans): add - and = to escaped chars inside code spans
Browse files Browse the repository at this point in the history
  • Loading branch information
tivie committed Jan 29, 2017
1 parent 7d63a3e commit 4243a31
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 19 deletions.
9 changes: 1 addition & 8 deletions dist/showdown.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/showdown.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/showdown.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/showdown.min.js.map

Large diffs are not rendered by default.

9 changes: 1 addition & 8 deletions src/subParsers/encodeCode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4243a31

Please sign in to comment.