Commit fcc100768ed74f3e33226d5f79c7df2e4f89a27a

Martin Mitas 2016-10-09T00:03:11

Fix: HTML block type 7 cannot interrupt paragraph.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/md4c/md4c.c b/md4c/md4c.c
index b95e887..94827ae 100644
--- a/md4c/md4c.c
+++ b/md4c/md4c.c
@@ -1635,6 +1635,11 @@ redo_indentation_after_blockquote_mark:
         &&  line->indent < ctx->code_indent_offset)
     {
         ctx->html_block_type = md_is_html_block_start_condition(ctx, off);
+
+        /* HTML block type 7 cannot interrupt paragraph. */
+        if(ctx->html_block_type == 7  &&  pivot_line->type == MD_LINE_TEXT)
+            ctx->html_block_type = -1;
+
         if(ctx->html_block_type > 0) {
             /* The line itself also may immediately close the block. */
             if(md_is_html_block_end_condition(ctx, off) == ctx->html_block_type) {