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 d82bf9e0a0cbb6bcff208a257be4738d0a16a95e
parent 4bb7cf8a4b4288c09ca4d5935a51091bd57b980d
Author: Martin Mitas <mity@morous.org>
Date:   Sat, 26 Nov 2016 23:13:35 +0100

md_is_container_mark: If indented as an indented code block, we cannot be a container start.

This fixes this:

> foo
    - bar

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

diff --git a/md4c/md4c.c b/md4c/md4c.c @@ -4583,6 +4583,9 @@ md_is_container_mark(MD_CTX* ctx, unsigned indent, OFF beg, OFF* p_end, MD_CONTA OFF off = beg; OFF max_end; + if(indent >= ctx->code_indent_offset) + return FALSE; + /* Check for block quote mark. */ if(off < ctx->size && CH(off) == _T('>')) { off++;