md4c

C Markdown parser. Fast. SAX-like interface. Compliant to CommonMark specification.
git clone https://noulin.net/git/md4c.git
Log | Files | Refs | README | LICENSE

commit c7083d88bf77594a69f6c00f0b895526fe9606c7
parent 203ed89218113dcd0652b8ede5c9ada63a2f22ea
Author: Martin Mitas <mity@morous.org>
Date:   Thu,  1 Dec 2016 18:07:35 +0100

md_process_all_blocks: Block quote cannot be "tight".

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

Diffstat:
Mmd4c/md4c.c | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git 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 {