@@ -259,18 +259,15 @@ static void remove_trailing_blank_lines(cmark_strbuf *ln) {
259
259
// Check to see if a node ends with a blank line, descending
260
260
// if needed into lists and sublists.
261
261
static bool S_ends_with_blank_line (cmark_node * node ) {
262
- while (true) {
263
- if (S_last_line_checked (node )) {
264
- return (S_last_line_blank (node ));
265
- } else if ((S_type (node ) == CMARK_NODE_LIST ||
266
- S_type (node ) == CMARK_NODE_ITEM ) && node -> last_child ) {
267
- S_set_last_line_checked (node );
268
- node = node -> last_child ;
269
- continue ;
270
- } else {
271
- S_set_last_line_checked (node );
272
- return (S_last_line_blank (node ));
273
- }
262
+ if (S_last_line_checked (node )) {
263
+ return (S_last_line_blank (node ));
264
+ } else if ((S_type (node ) == CMARK_NODE_LIST ||
265
+ S_type (node ) == CMARK_NODE_ITEM ) && node -> last_child ) {
266
+ S_set_last_line_checked (node );
267
+ return (S_ends_with_blank_line (node -> last_child ));
268
+ } else {
269
+ S_set_last_line_checked (node );
270
+ return (S_last_line_blank (node ));
274
271
}
275
272
}
276
273
@@ -1140,7 +1137,6 @@ static cmark_node *check_open_blocks(cmark_parser *parser, cmark_chunk *input,
1140
1137
// fall through
1141
1138
case CMARK_NODE_CODE_BLOCK :
1142
1139
case CMARK_NODE_PARAGRAPH :
1143
- case CMARK_NODE_HTML_BLOCK :
1144
1140
// Jump to parser->current
1145
1141
container = parser -> current ;
1146
1142
cont_type = S_type (container );
0 commit comments