Commit 088ff08a7dfeab02c987ab60f4f70383aec6af84

Martin Mitas 2016-10-09T00:08:24

Fix: Check fir indented code block with higher priority then for blockquote.

diff --git a/md4c/md4c.c b/md4c/md4c.c
index 94827ae..1ee3e20 100644
--- a/md4c/md4c.c
+++ b/md4c/md4c.c
@@ -1540,6 +1540,16 @@ redo_indentation_after_blockquote_mark:
         goto done;
     }
 
+    /* Check whether we are indented code line.
+     * Note indented code block cannot interrupt paragraph. */
+    if((pivot_line->type == MD_LINE_BLANK || pivot_line->type == MD_LINE_INDENTEDCODE)
+        && line->indent >= ctx->code_indent_offset)
+    {
+        line->type = MD_LINE_INDENTEDCODE;
+        line->indent -= ctx->code_indent_offset;
+        goto done;
+    }
+
     /* Check blockquote mark. */
     if(off < ctx->size  &&  CH(off) == _T('>')) {
         off++;
@@ -1581,16 +1591,6 @@ redo_indentation_after_blockquote_mark:
         goto done;
     }
 
-    /* Check whether we are indented code line.
-     * Note indented code block cannot interrupt paragraph. */
-    if((pivot_line->type == MD_LINE_BLANK || pivot_line->type == MD_LINE_INDENTEDCODE)
-        && line->indent >= ctx->code_indent_offset)
-    {
-        line->type = MD_LINE_INDENTEDCODE;
-        line->indent -= ctx->code_indent_offset;
-        goto done;
-    }
-
     /* Check whether we are ATX header.
      * (We check the indentation to fix http://spec.commonmark.org/0.26/#example-40) */
     if(line->indent < ctx->code_indent_offset  &&  CH(off) == _T('#')) {