Commit ce8b5d9440f3c4087fab63fe80b5f5a316bdbb0c

Martin Mitas 2019-05-27T22:16:35

md_analyze_line: Blockquote with blank line can interrupt a paragraph. Fixes #83.

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__()`