From d0642637d89201a77086c727e8052af3f3baeadc Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 9 Sep 2018 22:04:30 -0700 Subject: Check for whitespace before reference title. Closes #263. --- src/inlines.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inlines.c b/src/inlines.c index bbda78f..171247e 100644 --- a/src/inlines.c +++ b/src/inlines.c @@ -1345,7 +1345,7 @@ bufsize_t cmark_parse_reference_inline(cmark_mem *mem, cmark_chunk *input, // parse optional link_title beforetitle = subj.pos; spnl(&subj); - matchlen = scan_link_title(&subj.input, subj.pos); + matchlen = subj.pos == beforetitle ? 0 : scan_link_title(&subj.input, subj.pos); if (matchlen) { title = cmark_chunk_dup(&subj.input, subj.pos, matchlen); subj.pos += matchlen; -- cgit v1.2.3