Commit 3eba7f424cd9dda93c3fb0cd357e7426aa9695bb

Martin Mitas 2016-11-24T23:50:06

md_analyze_line: End raw HTML block prematurely if enclosing container ends.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/md4c/md4c.c b/md4c/md4c.c
index 9e33802..7e3ab8c 100644
--- a/md4c/md4c.c
+++ b/md4c/md4c.c
@@ -4721,8 +4721,10 @@ redo:
             }
         }
 
-        line->type = MD_LINE_HTML;
-        goto done;
+        if(n_parents == ctx->n_containers) {
+            line->type = MD_LINE_HTML;
+            goto done;
+        }
     }
 
     /* Check for blank line. */