md_process_inlines: Fix when an expanded mark shadows some nested marks (issue #11).
diff --git a/md4c/md4c.c b/md4c/md4c.c
index a7b0491..ef92e69 100644
--- 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
index f4fb235..619fb7d 100644
--- 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 – bar") x
+.
+<p>x <a href="/url" title="foo – bar">link</a> x</p>
+````````````````````````````````
+
## Code coverage