summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-03-23 09:21:12 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2019-03-23 09:21:12 -0700
commit660990612f513c3c3be104c7f20de7e81ba41aee (patch)
treea545b5e44fc8b6a25a047267be37891df2de3627 /src
parent01be842b276b0049f53f720b29177a81b3d43273 (diff)
Update spec; allow internal delimiter runs to match if...
both have lengths that are multiples of 3. See commonmark/commonmark#528.
Diffstat (limited to 'src')
-rw-r--r--src/inlines.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/inlines.c b/src/inlines.c
index bab607a..6e92aff 100644
--- a/src/inlines.c
+++ b/src/inlines.c
@@ -642,7 +642,8 @@ static void process_emphasis(subject *subj, delimiter *stack_bottom) {
// interior closer of size 2 can't match opener of size 1
// or of size 1 can't match 2
if (!(closer->can_open || opener->can_close) ||
- ((opener->length + closer->length) % 3) != 0) {
+ closer->length % 3 == 0 ||
+ (opener->length + closer->length) % 3 != 0) {
opener_found = true;
break;
}