Commit 02061353593b0d52fa9b83e661f7037332c16021

Martin Mitas 2016-10-04T01:11:46

ATX header cannot eat multiple lines.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/md4c/md4c.c b/md4c/md4c.c
index 3a33fc9..e761127 100644
--- a/md4c/md4c.c
+++ b/md4c/md4c.c
@@ -457,8 +457,8 @@ md_process_doc(MD_CTX *ctx)
 
         /* The same block continues as long lines are of the same type. */
         if(line->type == pivot_line->type) {
-            /* But not so thematic break. */
-            if(line->type == MD_LINE_HR)
+            /* But not so thematic break and ATX headers. */
+            if(line->type == MD_LINE_HR || line->type == MD_LINE_ATXHEADER)
                 goto force_block_end;
 
             /* Do not grow the 'lines' because of blank lines. Semantically