cmark

My personal build of CMark ✏️

Commit
4226e42ff8dfa5a5375c1ee958b9d5eb2fe5b188
Parent
0fc7c24f214c54bda5513ed2f352353f1e0f9dc4
Author
John MacFarlane <jgm@berkeley.edu>
Date

Don't allow list markers to be indented >= 4 spaces.

See commonmark/CommonMark#497.

Diffstat

1 file changed, 1 insertion, 0 deletions

Status File Name N° Changes Insertions Deletions
Modified src/blocks.c 1 1 0
diff --git a/src/blocks.c b/src/blocks.c
@@ -945,6 +945,7 @@ static void open_new_blocks(cmark_parser *parser, cmark_node **container,
                              parser->first_nonspace + 1);
       S_advance_offset(parser, input, input->len - 1 - parser->offset, false);
     } else if ((!indented || cont_type == CMARK_NODE_LIST) &&
+	       parser->indent < 4 &&
                (matched = parse_list_marker(
                     parser->mem, input, parser->first_nonspace,
                     (*container)->type == CMARK_NODE_PARAGRAPH, &data))) {