mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
FIX: inner block string like a_someting_ will be replaced by em or strong
This commit is contained in:
parent
2e102c72b2
commit
59a5a98e1c
|
@ -1130,10 +1130,10 @@ var _EncodeCode = function(text) {
|
|||
var _DoItalicsAndBold = function(text) {
|
||||
|
||||
// <strong> must go first:
|
||||
text = text.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g,
|
||||
text = text.replace(/^(\*\*|__)(?=\S)([^\r]*?\S[*_]*)$\1/g,
|
||||
"<strong>$2</strong>");
|
||||
|
||||
text = text.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g,
|
||||
text = text.replace(/^(\*|_)(?=\S)([^\r]*?\S)$\1/g,
|
||||
"<em>$2</em>");
|
||||
|
||||
return text;
|
||||
|
|
Loading…
Reference in New Issue
Block a user