From e9c53bbdfa14c7a43cc8bb78cd6cc56ea86b03db Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 11 Jul 2016 22:37:16 +0100 Subject: Removed "two blanks breaks out of a list" feature. --- src/blocks.c | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'src') diff --git a/src/blocks.c b/src/blocks.c index 2cd2ec8..6031c18 100644 --- a/src/blocks.c +++ b/src/blocks.c @@ -222,24 +222,6 @@ static bool ends_with_blank_line(cmark_node *node) { return false; } -// Break out of all containing lists -static int break_out_of_lists(cmark_parser *parser, cmark_node **bptr) { - cmark_node *container = *bptr; - cmark_node *b = parser->root; - // find first containing NODE_LIST: - while (b && S_type(b) != CMARK_NODE_LIST) { - b = b->last_child; - } - if (b) { - while (container && container != b) { - container = finalize(parser, container); - } - finalize(parser, b); - *bptr = b->parent; - } - return 0; -} - static cmark_node *finalize(cmark_parser *parser, cmark_node *b) { bufsize_t pos; cmark_node *item; @@ -1154,10 +1136,6 @@ static void S_process_line(cmark_parser *parser, const unsigned char *buffer, container = last_matched_container; - // check to see if we've hit 2nd blank line, break out of list: - if (parser->blank && S_last_line_blank(container)) - break_out_of_lists(parser, &container); - open_new_blocks(parser, &container, &input, all_matched); add_text_to_container(parser, container, last_matched_container, &input); -- cgit v1.2.3