Skip to content

Commit 7f567e2

Browse files
Revert "Also handle CMARK_NODE_LIST"
This reverts commit 27ba3a4.
1 parent 66a36c4 commit 7f567e2

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/blocks.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,16 +1109,14 @@ static cmark_node *check_open_blocks(cmark_parser *parser, cmark_chunk *input,
11091109
const size_t n_para = read_open_block_count(&tmp_parser, CMARK_NODE_PARAGRAPH);
11101110
if (n_list + n_item + n_para == tmp_parser.total_open_blocks) {
11111111
if (parser->current->flags & CMARK_NODE__OPEN_BLOCK) {
1112-
if (parser->current->flags & CMARK_NODE__OPEN) {
1113-
switch (S_type(parser->current)) {
1114-
case CMARK_NODE_PARAGRAPH:
1115-
case CMARK_NODE_LIST:
1116-
case CMARK_NODE_ITEM:
1112+
if (S_type(parser->current) == CMARK_NODE_PARAGRAPH) {
1113+
container = parser->current;
1114+
goto done;
1115+
}
1116+
if (S_type(parser->current) == CMARK_NODE_ITEM) {
1117+
if (parser->current->flags & CMARK_NODE__OPEN) {
11171118
container = parser->current;
11181119
cont_type = S_type(container);
1119-
break;
1120-
default:
1121-
break;
11221120
}
11231121
}
11241122
}

0 commit comments

Comments
 (0)