summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-03-25 14:24:13 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-03-25 14:24:13 -0700
commit4226e42ff8dfa5a5375c1ee958b9d5eb2fe5b188 (patch)
treebd00dfa84c39e9708f1962ef06da05a4486391f5 /src
parent0fc7c24f214c54bda5513ed2f352353f1e0f9dc4 (diff)
Don't allow list markers to be indented >= 4 spaces.
See commonmark/CommonMark#497.
Diffstat (limited to 'src')
-rw-r--r--src/blocks.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/blocks.c b/src/blocks.c
index 7f58ffd..3e32535 100644
--- 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))) {