mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
fix(strikethrough): fix striketrough being wrongly parsed inside codeSpans
This commit is contained in:
parent
4243a313fd
commit
169cbe8e2d
BIN
dist/showdown.js
vendored
BIN
dist/showdown.js
vendored
Binary file not shown.
BIN
dist/showdown.js.map
vendored
BIN
dist/showdown.js.map
vendored
Binary file not shown.
BIN
dist/showdown.min.js
vendored
BIN
dist/showdown.min.js
vendored
Binary file not shown.
BIN
dist/showdown.min.js.map
vendored
BIN
dist/showdown.min.js.map
vendored
Binary file not shown.
|
@ -16,7 +16,7 @@ showdown.subParser('encodeCode', function (text, options, globals) {
|
|||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
// Now, escape characters that are magic in Markdown:
|
||||
.replace(/([*_{}\[\]\\=-])/g, showdown.helper.escapeCharactersCallback);
|
||||
.replace(/([*_{}\[\]\\=~-])/g, showdown.helper.escapeCharactersCallback);
|
||||
|
||||
text = globals.converter._dispatch('encodeCode.after', text, options, globals);
|
||||
return text;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
<p>a <del>strikethrough</del> word</p>
|
||||
<p>this should~~not be parsed</p>
|
||||
<p><del>strike-through text</del></p>
|
||||
<p><code>~~strikethough inside code span~~</code></p>
|
||||
<p>escaped ~~strikethrough~~</p>
|
||||
<p>escaped ~~strikethrough~~</p>
|
||||
|
|
|
@ -3,3 +3,9 @@ a ~~strikethrough~~ word
|
|||
this should~~not be parsed
|
||||
|
||||
~~strike-through text~~
|
||||
|
||||
`~~strikethough inside code span~~`
|
||||
|
||||
escaped \~~strikethrough~~
|
||||
|
||||
escaped \~~strikethrough\~~
|
||||
|
|
Loading…
Reference in New Issue
Block a user