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 f9b4cb8f6e33d04b9940cb6e77ea6987e1888b88
parent c235a02ee8b78c226373e4867d99fd3f13c25611
Author: Martin Mitas <mity@morous.org>
Date:   Thu, 15 Dec 2016 16:47:41 +0100

md_process_inlines: Fix when an expanded mark shadows some nested marks (issue #11).

Diffstat:
Mmd4c/md4c.c | 2+-
Mtest/coverage.txt | 7+++++++
2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/md4c/md4c.c b/md4c/md4c.c @@ -3535,7 +3535,7 @@ md_process_inlines(MD_CTX* ctx, const MD_LINE* lines, int n_lines) /* Move to next resolved mark. */ prev_mark = mark; mark++; - while(!(mark->flags & MD_MARK_RESOLVED)) + while(!(mark->flags & MD_MARK_RESOLVED) || mark->beg < off) mark++; } diff --git a/test/coverage.txt b/test/coverage.txt @@ -79,6 +79,13 @@ x </ul> ```````````````````````````````` +### [Issue 11](https://github.com/mity/md4c/issues/11) +```````````````````````````````` example +x [link](/url "foo &ndash; bar") x +. +<p>x <a href="/url" title="foo – bar">link</a> x</p> +```````````````````````````````` + ## Code coverage