summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-08-09 10:54:29 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2017-08-09 10:54:29 -0700
commitb9c7a496ba7dd9c3495bae2ff2855899e47b245d (patch)
tree1531288a341e21c84ad38f4f2b681c711a590ad9 /src
parent61b51fa7c8ec635eee19a16c6aa38c39093a0572 (diff)
--smart: open quote can never occur right after `]` or `)`.
Closes #227.
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 6bf82e2..2d7f385 100644
--- a/src/inlines.c
+++ b/src/inlines.c
@@ -345,7 +345,8 @@ static int scan_delims(subject *subj, unsigned char c, bool *can_open,
*can_close = right_flanking &&
(!left_flanking || cmark_utf8proc_is_punctuation(after_char));
} else if (c == '\'' || c == '"') {
- *can_open = left_flanking && !right_flanking;
+ *can_open = left_flanking && !right_flanking &&
+ before_char != ']' && before_char != ')';
*can_close = right_flanking;
} else {
*can_open = left_flanking;