cmark

My personal build of CMark ✏️

Commit
e8809f7e448bffc51adac1f2e143d99496d6a55f
Parent
83ea962027d9425f404bf7659cf336fd1bd03417
Author
John MacFarlane <jgm@berkeley.edu>
Date

Updated JS and C implementations for #209.

A setext header was being treated a if it were a blank line for purposes of tight/loose list determination.

Closes #209.

Diffstat

2 files changed, 2 insertions, 0 deletions

Status File Name N° Changes Insertions Deletions
Modified js/lib/blocks.js 1 1 0
Modified src/blocks.c 1 1 0
diff --git a/js/lib/blocks.js b/js/lib/blocks.js
@@ -465,6 +465,7 @@ var incorporateLine = function(ln, line_number) {
         // on an empty list item.
         container.last_line_blank = blank &&
             !(container.t == 'BlockQuote' ||
+              container.t == 'SetextHeader' ||
               container.t == 'FencedCode' ||
               (container.t == 'ListItem' &&
                container.children.length === 0 &&
diff --git a/src/blocks.c b/src/blocks.c
@@ -728,6 +728,7 @@ void cmark_process_line(cmark_doc_parser *parser, const char *buffer,
 	// on an empty list item.
 	container->last_line_blank = (blank &&
 			container->type != NODE_BQUOTE &&
+			container->type != NODE_SETEXT_HEADER &&
 			container->type != NODE_FENCED_CODE &&
 			!(container->type == NODE_LIST_ITEM &&
 				container->first_child == NULL &&