Skip to content

Commit d064263

Browse files
committed
Check for whitespace before reference title.
Closes commonmark#263.
1 parent c981704 commit d064263

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/inlines.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1345,7 +1345,7 @@ bufsize_t cmark_parse_reference_inline(cmark_mem *mem, cmark_chunk *input,
13451345
// parse optional link_title
13461346
beforetitle = subj.pos;
13471347
spnl(&subj);
1348-
matchlen = scan_link_title(&subj.input, subj.pos);
1348+
matchlen = subj.pos == beforetitle ? 0 : scan_link_title(&subj.input, subj.pos);
13491349
if (matchlen) {
13501350
title = cmark_chunk_dup(&subj.input, subj.pos, matchlen);
13511351
subj.pos += matchlen;

0 commit comments

Comments
 (0)