Commit a0be9834f4f2b54273ec473b226ef97bb7144b25

Martin Mitas 2016-10-04T21:28:23

md_is_html_block_start_condition: Fix check for "<!--".

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/md4c/md4c.c b/md4c/md4c.c
index c0ac87a..ced3f96 100644
--- a/md4c/md4c.c
+++ b/md4c/md4c.c
@@ -539,7 +539,7 @@ md_is_html_block_start_condition(MD_CTX* ctx, OFF beg)
     }
 
     /* Check for type 2: <!-- */
-    if(off + 3 < ctx->size  &&  CH(off) == _T('!')  &&  CH(off) == _T('-')  &&  CH(off+1) == _T('-'))
+    if(off + 3 < ctx->size  &&  CH(off) == _T('!')  &&  CH(off+1) == _T('-')  &&  CH(off+2) == _T('-'))
         return 2;
 
     /* Check for type 3: <? */