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 dda885e7ab4862e4e07f1f623889bbcabf50bad3
parent 24ac7eadd8d6168456f297a0775bfddb0dea37db
Author: Martin Mitas <mity@morous.org>
Date:   Sat,  8 Oct 2016 21:03:10 +0200

Fix parsing of settext header underline.

If indented, it is not header.

Diffstat:
Mmd4c/md4c.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/md4c/md4c.c b/md4c/md4c.c @@ -1574,7 +1574,7 @@ redo_indentation_after_blockquote_mark: } /* Check whether we are Setext underline. */ - if(pivot_line->type == MD_LINE_TEXT && (CH(off) == _T('=') || CH(off) == _T('-'))) { + if(line->indent < 4 && pivot_line->type == MD_LINE_TEXT && (CH(off) == _T('=') || CH(off) == _T('-'))) { if(md_is_setext_underline(ctx, off, &off) == 0) { line->type = MD_LINE_SETEXTUNDERLINE; goto done;