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 4e416f1be1fa51e94051ffa5f191f76fcc8ff495
parent 12b16001b76c017854da2c5f642ed1f3c070591b
Author: Martin Mitas <mity@morous.org>
Date:   Thu,  1 Dec 2016 22:09:38 +0100

md_analyze_line: Fix blank lines inside a fenced code block when nested in a container.

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

diff --git a/md4c/md4c.c b/md4c/md4c.c @@ -4802,6 +4802,15 @@ redo: } } + if(off >= ctx->size || ISNEWLINE(off)) { + /* Blank line does not need any real indentation to be nested inside + * a list. */ + if(n_brothers + n_children == 0) { + while(n_parents < ctx->n_containers && ctx->containers[n_parents].ch != _T('>')) + n_parents++; + } + } + /* Change indentation accordingly to the initial code fence. */ if(n_parents == ctx->n_containers) { if(line->indent > pivot_line->indent)