mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
Embedded in italics must add a space in front of the first asterisk and add a space after the second asterisk.
This commit is contained in:
parent
053288f2fe
commit
fe7ba8e0d4
|
@ -1133,7 +1133,10 @@ var _DoItalicsAndBold = function(text) {
|
|||
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>");
|
||||
|
||||
text = text.replace(/ (\*|_)(?=\S)([^\r]*?\S)\1 /g,
|
||||
"<em>$2</em>");
|
||||
|
||||
return text;
|
||||
|
|
Loading…
Reference in New Issue
Block a user