|
@@ -1,4 +1,4 @@
|
|
|
-;/*! showdown v 1.8.2 - 16-11-2017 */
|
|
|
+;/*! showdown v 1.8.2 - 17-11-2017 */
|
|
|
(function(){
|
|
|
/**
|
|
|
* Created by Tivie on 13-07-2015.
|
|
@@ -3626,14 +3626,14 @@ showdown.subParser('italicsAndBold', function (text, options, globals) {
|
|
|
|
|
|
// Now parse asterisks
|
|
|
if (options.literalMidWordAsterisks) {
|
|
|
- text = text.trim().replace(/(^| )\*{3}(\S[\s\S]*?)\*{3}([ ,;!?.]|$)/g, function (wm, lead, txt, trail) {
|
|
|
- return parseInside (txt, lead + '<strong><em>', '</em></strong>' + trail);
|
|
|
+ text = text.replace(/([^*]|^)\B\*\*\*(\S[\s\S]+?)\*\*\*\B(?!\*)/g, function (wm, lead, txt) {
|
|
|
+ return parseInside (txt, lead + '<strong><em>', '</em></strong>');
|
|
|
});
|
|
|
- text = text.trim().replace(/(^| )\*{2}(\S[\s\S]*?)\*{2}([ ,;!?.]|$)/g, function (wm, lead, txt, trail) {
|
|
|
- return parseInside (txt, lead + '<strong>', '</strong>' + trail);
|
|
|
+ text = text.replace(/([^*]|^)\B\*\*(\S[\s\S]+?)\*\*\B(?!\*)/g, function (wm, lead, txt) {
|
|
|
+ return parseInside (txt, lead + '<strong>', '</strong>');
|
|
|
});
|
|
|
- text = text.trim().replace(/(^| )\*(\S[\s\S]*?)\*([ ,;!?.]|$)/g, function (wm, lead, txt, trail) {
|
|
|
- return parseInside (txt, lead + '<em>', '</em>' + trail);
|
|
|
+ text = text.replace(/([^*]|^)\B\*(\S[\s\S]+?)\*\B(?!\*)/g, function (wm, lead, txt) {
|
|
|
+ return parseInside (txt, lead + '<em>', '</em>');
|
|
|
});
|
|
|
} else {
|
|
|
text = text.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g, function (wm, m) {
|