Skip to content

Commit

Permalink
Allow internal delim runs to match if both have lengths that...
Browse files Browse the repository at this point in the history
are multiples of 3. See commonmark/commonmark-spec#528.
  • Loading branch information
jgm committed Mar 23, 2019
1 parent 98ed8be commit 04e141b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/inlines.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,8 @@ var processEmphasis = function(stack_bottom) {
while (opener !== null && opener !== stack_bottom &&
opener !== openers_bottom[closercc]) {
odd_match = (closer.can_open || opener.can_close) &&
(opener.origdelims + closer.origdelims) % 3 === 0;
closer.origdelims % 3 !== 0 &&
(opener.origdelims + closer.origdelims) % 3 === 0;
if (opener.cc === closer.cc && opener.can_open && !odd_match) {
opener_found = true;
break;
Expand Down

0 comments on commit 04e141b

Please sign in to comment.