cmark
My personal build of CMark ✏️
- Commit
- faf7ab378518b6ad8792603a41c641cb13b2ff83
- Parent
- e3990d751b96dbaa91ca9cdb20749c9002402ff6
- Author
- John MacFarlane <jgm@berkeley.edu>
- Date
Fix #289.
A link destination can't start with `<` unless it is
an angle-bracket link that also ends with `>`.
(If your URL really starts with `<`, URL-escape it.)
Diffstat
1 file changed, 1 insertion, 4 deletions
Status |
File Name |
N° Changes |
Insertions |
Deletions |
Modified |
src/inlines.c |
5 |
1 |
4 |
diff --git a/src/inlines.c b/src/inlines.c
@@ -967,13 +967,10 @@ static bufsize_t manual_scan_link_url(cmark_chunk *input, bufsize_t offset,
} else if (input->data[i] == '\\')
i += 2;
else if (input->data[i] == '\n' || input->data[i] == '<')
- return manual_scan_link_url_2(input, offset, output);
+ return -1;
else
++i;
}
- if (i >= input->len) {
- return manual_scan_link_url_2(input, offset, output);
- }
} else {
return manual_scan_link_url_2(input, offset, output);
}