- Commit
- d0642637d89201a77086c727e8052af3f3baeadc
- Parent
- c9817041afa133c5dc9869e5b309667861527c30
- Author
- John MacFarlane <jgm@berkeley.edu>
- Date
Check for whitespace before reference title.
Closes #263.
My personal build of CMark ✏️
Check for whitespace before reference title.
Closes #263.
1 file changed, 1 insertion, 1 deletion
Status | File Name | N° Changes | Insertions | Deletions |
Modified | src/inlines.c | 2 | 1 | 1 |
diff --git 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;