Commit c7083d88bf77594a69f6c00f0b895526fe9606c7

Martin Mitas 2016-12-01T18:07:35

md_process_all_blocks: Block quote cannot be "tight". Block quote cannot "inherit" tightness of a (tight) enclosing list item.

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 df3ce83..1261064 100644
--- a/md4c/md4c.c
+++ b/md4c/md4c.c
@@ -3901,6 +3901,12 @@ md_process_all_blocks(MD_CTX* ctx)
                 if(block->type == MD_BLOCK_UL || block->type == MD_BLOCK_OL) {
                     ctx->containers[ctx->n_containers].is_loose = (block->flags & MD_BLOCK_LOOSE_LIST);
                     ctx->n_containers++;
+                } else if(block->type == MD_BLOCK_QUOTE) {
+                    /* This causes that any text in a block quote, even if
+                     * nested inside a tight list item, is wrapped with
+                     * <p>...</p>. */
+                    ctx->containers[ctx->n_containers].is_loose = TRUE;
+                    ctx->n_containers++;
                 }
             }
         } else {