diff --git a/lib/marked.js b/lib/marked.js index 51c7c2ac06..318ab60d84 100644 --- a/lib/marked.js +++ b/lib/marked.js @@ -541,7 +541,7 @@ var inline = { reflink: /^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/, nolink: /^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/, strong: /^__([^\s])__(?!_)|^\*\*([^\s])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/, - em: /^_([^\s_])_(?!_)|^\*([^\s*"<\[])\*(?!\*)|^_([^\s][\s\S]*?[^\s_])_(?!_)|^_([^\s_][\s\S]*?[^\s])_(?!_)|^\*([^\s"<\[][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/, + em: /^_([^\s_])_(?!_)|^\*([^\s*"<\[])\*(?!\*)|^_([^\s][\s\S]*?[^\s_])_(?!_|[^\s.])|^_([^\s_][\s\S]*?[^\s])_(?!_|[^\s.])|^\*([^\s"<\[][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/, code: /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, br: /^( {2,}|\\)\n(?!\s*$)/, del: noop, diff --git a/test/specs/commonmark/commonmark-spec.js b/test/specs/commonmark/commonmark-spec.js index 8513cc939f..7cca2d830b 100644 --- a/test/specs/commonmark/commonmark-spec.js +++ b/test/specs/commonmark/commonmark-spec.js @@ -45,7 +45,7 @@ var messenger = new Messenger(); |Backslash escapes | 10 of 13 | 77%| |Entity and numeric character references | 9 of 12 | 75%| |Code spans | 11 of 17 | 65%| -|Emphasis and strong emphasis | 74 of 128 | 58%| +|Emphasis and strong emphasis | 79 of 128 | 61%| |Links | 69 of 84 | 82%| |Images | 15 of 22 | 68%| |Autolinks | 15 of 19 | 79%| @@ -338,7 +338,7 @@ describe('CommonMark 0.28 Emphasis and strong emphasis', function() { var section = 'Emphasis and strong emphasis'; // var shouldPassButFails = []; - var shouldPassButFails = [334, 342, 348, 349, 352, 353, 354, 355, 356, 360, 368, 369, 371, 372, 378, 380, 381, 382, 387, 388, 392, 393, 394, 395, 396, 402, 403, 409, 416, 419, 420, 421, 422, 423, 424, 428, 431, 432, 433, 434, 435, 436, 443, 444, 445, 448, 449, 451, 453, 454, 455, 456, 457, 458]; + var shouldPassButFails = [334, 342, 348, 349, 352, 353, 360, 368, 369, 371, 372, 378, 380, 381, 382, 387, 388, 392, 393, 394, 395, 396, 402, 403, 409, 416, 419, 420, 421, 422, 423, 424, 428, 431, 432, 433, 434, 435, 436, 443, 444, 445, 448, 449, 453, 454, 455, 457, 458]; var willNotBeAttemptedByCoreTeam = [];