Commit 762aee7f0dae8ebb328d65949474751540efc8e5

Martin Mitas 2016-10-08T23:37:02

Fix: Check for HTML block continuation after checking for blockquote mark.

diff --git a/md4c/md4c.c b/md4c/md4c.c
index 7a11ac3..224c416 100644
--- a/md4c/md4c.c
+++ b/md4c/md4c.c
@@ -1540,6 +1540,16 @@ redo_indentation_after_blockquote_mark:
         goto done;
     }
 
+    /* Check blockquote mark. */
+    if(off < ctx->size  &&  CH(off) == _T('>')) {
+        off++;
+        if(off < ctx->size  &&  CH(off) == _T(' '))
+            off++;
+        line->quote_level++;
+        line->indent = 0;
+        goto redo_indentation_after_blockquote_mark;
+    }
+
     /* Check whether we are HTML block continuation. */
     if(pivot_line->type == MD_LINE_HTML  &&  ctx->html_block_type > 0) {
         if(md_is_html_block_end_condition(ctx, off) == ctx->html_block_type) {
@@ -1551,16 +1561,6 @@ redo_indentation_after_blockquote_mark:
         goto done;
     }
 
-    /* Check blockquote mark. */
-    if(off < ctx->size  &&  CH(off) == _T('>')) {
-        off++;
-        if(off < ctx->size  &&  CH(off) == _T(' '))
-            off++;
-        line->quote_level++;
-        line->indent = 0;
-        goto redo_indentation_after_blockquote_mark;
-    }
-
     /* Check whether we are blank line.
      * Note blank lines after indented code are treated as part of that block.
      * If they are at the end of the block, it is discarded by caller.