diff --git a/src/showdown.js b/src/showdown.js index 43920d9..56d8346 100644 --- a/src/showdown.js +++ b/src/showdown.js @@ -389,7 +389,7 @@ var _RunSpanGamut = function(text) { // delimiters in inline links like [this](). text = _DoAutoLinks(text); text = _EncodeAmpsAndAngles(text); - text = _DoItalicsAndBold(text); + text = _DoItalicsAndBoldAndStrikethrough(text); // Do hard breaks: text = text.replace(/ +\n/g,"
\n"); @@ -978,19 +978,20 @@ var _EncodeCode = function(text) { } -var _DoItalicsAndBold = function(text) { +var _DoItalicsAndBoldAndStrikethrough = function(text) { // must go first: text = text.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g, "$2"); + text = text.replace(/(~T~T)(?=\S)([^\r]*?\S[*_]*)\1/g, "$2"); + text = text.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g, "$2"); return text; } - var _DoBlockQuotes = function(text) { /*