diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/inlines.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/inlines.c b/src/inlines.c index 021d5a3..eea0631 100644 --- a/src/inlines.c +++ b/src/inlines.c @@ -842,7 +842,9 @@ static bufsize_t manual_scan_link_url(cmark_chunk *input, bufsize_t offset) { } } else { while (i < input->len) { - if (input->data[i] == '\\') + if (input->data[i] == '\\' && + i + 1 < input-> len && + cmark_ispunct(input->data[i+1])) i += 2; else if (input->data[i] == '(') { ++nb_p; |