|
@@ -1829,8 +1829,8 @@ showdown.subParser('italicsAndBold', function (text, options) {
|
|
text = text.replace(/(^|\s|>|\b)__(?=\S)([^]+?)__(?=\b|<|\s|$)/gm, '$1<strong>$2</strong>');
|
|
text = text.replace(/(^|\s|>|\b)__(?=\S)([^]+?)__(?=\b|<|\s|$)/gm, '$1<strong>$2</strong>');
|
|
text = text.replace(/(^|\s|>|\b)_(?=\S)([^]+?)_(?=\b|<|\s|$)/gm, '$1<em>$2</em>');
|
|
text = text.replace(/(^|\s|>|\b)_(?=\S)([^]+?)_(?=\b|<|\s|$)/gm, '$1<em>$2</em>');
|
|
//asterisks
|
|
//asterisks
|
|
- text = text.replace(/\*\*(?=\S)([^]+?)\*\*/g, '<strong>$1</strong>');
|
|
|
|
- text = text.replace(/\*(?=\S)([^]+?)\*/g, '<em>$1</em>');
|
|
|
|
|
|
+ text = text.replace(/(\*\*)(?=\S)([^\r]*?\S[*]*)\1/g, '<strong>$2</strong>');
|
|
|
|
+ text = text.replace(/(\*)(?=\S)([^\r]*?\S)\1/g, '<em>$2</em>');
|
|
|
|
|
|
} else {
|
|
} else {
|
|
// <strong> must go first:
|
|
// <strong> must go first:
|