diff --git a/dist/showdown.js b/dist/showdown.js index bdd07a8..a82f633 100644 Binary files a/dist/showdown.js and b/dist/showdown.js differ diff --git a/dist/showdown.js.map b/dist/showdown.js.map index b9c2fd7..0b3c9f6 100644 Binary files a/dist/showdown.js.map and b/dist/showdown.js.map differ diff --git a/dist/showdown.min.js b/dist/showdown.min.js index ea2f7b5..a0ac136 100644 Binary files a/dist/showdown.min.js and b/dist/showdown.min.js differ diff --git a/dist/showdown.min.js.map b/dist/showdown.min.js.map index 3f1838a..13e1034 100644 Binary files a/dist/showdown.min.js.map and b/dist/showdown.min.js.map differ diff --git a/src/subParsers/makehtml/italicsAndBold.js b/src/subParsers/makehtml/italicsAndBold.js index b644075..07862be 100644 --- a/src/subParsers/makehtml/italicsAndBold.js +++ b/src/subParsers/makehtml/italicsAndBold.js @@ -13,10 +13,10 @@ showdown.subParser('makehtml.italicsAndBold', function (text, options, globals) // Parse underscores if (options.literalMidWordUnderscores) { - text = text.replace(/\b___(\S[\s\S]*)___\b/g, function (wm, txt) { + text = text.replace(/\b___(\S[\s\S]*?)___\b/g, function (wm, txt) { return parseInside (txt, '', ''); }); - text = text.replace(/\b__(\S[\s\S]*)__\b/g, function (wm, txt) { + text = text.replace(/\b__(\S[\s\S]*?)__\b/g, function (wm, txt) { return parseInside (txt, '', ''); }); text = text.replace(/\b_(\S[\s\S]*?)_\b/g, function (wm, txt) { diff --git a/test/functional/makehtml/cases/features/literalMidWordUnderscores/basic.html b/test/functional/makehtml/cases/features/literalMidWordUnderscores/basic.html index 8293687..7d7d9e9 100644 --- a/test/functional/makehtml/cases/features/literalMidWordUnderscores/basic.html +++ b/test/functional/makehtml/cases/features/literalMidWordUnderscores/basic.html @@ -7,3 +7,6 @@
strippers, hitler, and stalin
strippers, hitler, and stalin
strippers, hitler, and stalin
+multiple italics and bolds in a paragraph
+multiple bolds in a paragraph
+multiple italics in a paragraph
\ No newline at end of file diff --git a/test/functional/makehtml/cases/features/literalMidWordUnderscores/basic.md b/test/functional/makehtml/cases/features/literalMidWordUnderscores/basic.md index e2be213..54a820e 100644 --- a/test/functional/makehtml/cases/features/literalMidWordUnderscores/basic.md +++ b/test/functional/makehtml/cases/features/literalMidWordUnderscores/basic.md @@ -15,3 +15,9 @@ strippers, _hitler_, and stalin strippers, __hitler__, and stalin strippers, ___hitler___, and stalin + +___multiple___ italics and bolds in a ___paragraph___ + +__multiple__ bolds in a __paragraph__ + +_multiple_ italics in a _paragraph_ \ No newline at end of file diff --git a/test/functional/makehtml/cases/standard/emphasis.html b/test/functional/makehtml/cases/standard/emphasis.html index 06cb4e4..805daf8 100644 --- a/test/functional/makehtml/cases/standard/emphasis.html +++ b/test/functional/makehtml/cases/standard/emphasis.html @@ -37,3 +37,9 @@this is imbued link with strong
this is imbued link with strong
this link has underscore some_link
+multiple italics and bolds with underscores in a paragraph
+multiple italics and bolds with asterisks in a paragraph
+multiple bolds with underscores in a paragraph
+multiple bolds with asterisks in a paragraph
+multiple italics with underscores in a paragraph
+multiple italics with asterisks in a paragraph
diff --git a/test/functional/makehtml/cases/standard/emphasis.md b/test/functional/makehtml/cases/standard/emphasis.md index 967a074..1177fde 100644 --- a/test/functional/makehtml/cases/standard/emphasis.md +++ b/test/functional/makehtml/cases/standard/emphasis.md @@ -74,3 +74,15 @@ this is **imbued link with strong** this is __imbued link with strong__ this link has underscore [some_link](http://www.google.com/some_link) + +___multiple___ italics and bolds with underscores in a ___paragraph___ + +***multiple*** italics and bolds with asterisks in a ***paragraph*** + +__multiple__ bolds with underscores in a __paragraph__ + +**multiple** bolds with asterisks in a **paragraph** + +_multiple_ italics with underscores in a _paragraph_ + +_multiple_ italics with asterisks in a _paragraph_