Skip to content

Commit 4226e42

Browse files
committed
Don't allow list markers to be indented >= 4 spaces.
See commonmark/commonmark-spec#497.
1 parent 0fc7c24 commit 4226e42

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/blocks.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -945,6 +945,7 @@ static void open_new_blocks(cmark_parser *parser, cmark_node **container,
945945
parser->first_nonspace + 1);
946946
S_advance_offset(parser, input, input->len - 1 - parser->offset, false);
947947
} else if ((!indented || cont_type == CMARK_NODE_LIST) &&
948+
parser->indent < 4 &&
948949
(matched = parse_list_marker(
949950
parser->mem, input, parser->first_nonspace,
950951
(*container)->type == CMARK_NODE_PARAGRAPH, &data))) {

0 commit comments

Comments
 (0)