Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/inlines.c
Original file line number Diff line number Diff line change
Expand Up @@ -1495,6 +1495,10 @@ bufsize_t cmark_parse_reference_inline(cmark_mem *mem, cmark_chunk *input,
if (!skip_line_end(&subj)) {
return 0;
}
// the previously scanned title turned out to be invalid (it was
// followed by trailing garbage instead of the end of the line), so
// the reference has no title after all.
title = cmark_chunk_literal("");
} else {
return 0;
}
Expand Down
10 changes: 10 additions & 0 deletions test/regression.txt
Original file line number Diff line number Diff line change
Expand Up @@ -321,3 +321,13 @@ Issue #611:
<p><foo>text</foo></p>
````````````````````````````````

Issue #468: Link reference definition title followed by trailing
garbage on the same line must not be treated as a title.
```````````````````````````````` example
[bla]: /bla
"The title" garbage
[bla]
.
<p>&quot;The title&quot; garbage
<a href="/bla">bla</a></p>
````````````````````````````````
Expand Down
Loading