md_analyze_line: Blockquote with blank line can interrupt a paragraph. Fixes #83.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 595045b..82df879 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,6 +22,9 @@ Fixes:
Fix link reference definition label matching for Unicode characters where
the folding mapping leads to multiple codepoints, as e.g. in `ẞ` -> `SS`.
+ * [#83](https://github.com/mity/md4c/issues/83):
+ Fix recognition of an empty blockquote which interrupts a paragraph.
+
## Version 0.3.3
diff --git a/md4c/md4c.c b/md4c/md4c.c
index 01e63a5..d2b4313 100644
--- a/md4c/md4c.c
+++ b/md4c/md4c.c
@@ -5700,7 +5700,7 @@ md_analyze_line(MD_CTX* ctx, OFF beg, OFF* p_end,
md_is_container_mark(ctx, line->indent, off, &off, &container))
{
if(pivot_line->type == MD_LINE_TEXT && n_parents == ctx->n_containers &&
- (off >= ctx->size || ISNEWLINE(off)))
+ (off >= ctx->size || ISNEWLINE(off)) && container.ch != _T('>'))
{
/* Noop. List mark followed by a blank line cannot interrupt a paragraph. */
} else if(pivot_line->type == MD_LINE_TEXT && n_parents == ctx->n_containers &&
diff --git a/test/coverage.txt b/test/coverage.txt
index 2815409..031be3c 100644
--- a/test/coverage.txt
+++ b/test/coverage.txt
@@ -191,6 +191,19 @@ __x_ _x___
````````````````````````````````
+### [Issue 83](https://github.com/mity/md4c/issues/83)
+
+```````````````````````````````` example
+foo
+>
+.
+<p>foo</p>
+<blockquote>
+</blockquote>
+
+````````````````````````````````
+
+
## Code coverage
### `md_is_unicode_whitespace__()`