Skip to content

Commit 3716b6c

Browse files
jgmkevinbackhouse
authored andcommitted
Update HTML comment scanner...
to accord with commonmark/commonmark-spec#713.
1 parent 8d4b76b commit 3716b6c

File tree

3 files changed

+3581
-3541
lines changed

3 files changed

+3581
-3541
lines changed

src/inlines.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -910,9 +910,9 @@ static cmark_node *handle_pointy_brace(subject *subj, int options) {
910910
if (c == '!') {
911911
c = subj->input.data[subj->pos+1];
912912
if (c == '-') {
913-
matchlen = scan_html_comment(&subj->input, subj->pos + 2);
913+
matchlen = scan_html_comment(&subj->input, subj->pos + 1);
914914
if (matchlen > 0)
915-
matchlen += 2; // prefix "<-"
915+
matchlen += 1; // prefix "<!"
916916
} else if (c == '[') {
917917
if ((subj->flags & FLAG_SKIP_HTML_CDATA) == 0) {
918918
matchlen = scan_html_cdata(&subj->input, subj->pos + 2);

0 commit comments

Comments
 (0)