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 762aee7f0dae8ebb328d65949474751540efc8e5
parent 14090e2e93d78c3ceca7f69d24d942d0faddab11
Author: Martin Mitas <mity@morous.org>
Date:   Sat,  8 Oct 2016 23:37:02 +0200

Fix: Check for HTML block continuation after checking for blockquote mark.

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

diff --git a/md4c/md4c.c b/md4c/md4c.c @@ -1540,6 +1540,16 @@ redo_indentation_after_blockquote_mark: goto done; } + /* Check blockquote mark. */ + if(off < ctx->size && CH(off) == _T('>')) { + off++; + if(off < ctx->size && CH(off) == _T(' ')) + off++; + line->quote_level++; + line->indent = 0; + goto redo_indentation_after_blockquote_mark; + } + /* Check whether we are HTML block continuation. */ if(pivot_line->type == MD_LINE_HTML && ctx->html_block_type > 0) { if(md_is_html_block_end_condition(ctx, off) == ctx->html_block_type) { @@ -1551,16 +1561,6 @@ redo_indentation_after_blockquote_mark: goto done; } - /* Check blockquote mark. */ - if(off < ctx->size && CH(off) == _T('>')) { - off++; - if(off < ctx->size && CH(off) == _T(' ')) - off++; - line->quote_level++; - line->indent = 0; - goto redo_indentation_after_blockquote_mark; - } - /* Check whether we are blank line. * Note blank lines after indented code are treated as part of that block. * If they are at the end of the block, it is discarded by caller.