cmark

My personal build of CMark ✏️

Commit
e9c53bbdfa14c7a43cc8bb78cd6cc56ea86b03db
Parent
fb64964880c1763e0e8596e37739b18663db03ec
Author
John MacFarlane <jgm@berkeley.edu>
Date

Removed "two blanks breaks out of a list" feature.

Diffstat

1 file changed, 0 insertions, 22 deletions

Status File Name N° Changes Insertions Deletions
Modified src/blocks.c 22 0 22
diff --git 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);