cmark

My personal build of CMark ✏️

Commit
c075a56436470061ffff9cf2ce7529984049e09e
Parent
7020eb8dab065c3806fc6174443c19e262344999
Author
John MacFarlane <jgm@berkeley.edu>
Date

Allow multiline setext header content, as per spec.

Diffstat

1 file changed, 1 insertion, 5 deletions

Status File Name N° Changes Insertions Deletions
Modified src/blocks.c 6 1 5
diff --git a/src/blocks.c b/src/blocks.c
@@ -800,11 +800,7 @@ static void S_process_line(cmark_parser *parser, const unsigned char *buffer,
 
     } else if (!indented && container->type == CMARK_NODE_PARAGRAPH &&
                (lev =
-                    scan_setext_heading_line(&input, parser->first_nonspace)) &&
-               // check that there is only one line in the paragraph:
-               (cmark_strbuf_strrchr(
-                    &container->string_content, '\n',
-                    cmark_strbuf_len(&container->string_content) - 2) < 0)) {
+                    scan_setext_heading_line(&input, parser->first_nonspace))) {
 
       container->type = CMARK_NODE_HEADING;
       container->as.heading.level = lev;