Commit fdc1d61eb03a284495b44791f4b74797180b206f

Martin Mitas 2018-04-11T19:47:11

In md_is_atxheader_line(), set *p_end on success. This prevents reiteration over the ATX header prefix in the caller.

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/md4c/md4c.c b/md4c/md4c.c
index 0f3522e..e6b2b94 100644
--- a/md4c/md4c.c
+++ b/md4c/md4c.c
@@ -4803,6 +4803,7 @@ md_is_atxheader_line(MD_CTX* ctx, OFF beg, OFF* p_beg, OFF* p_end, unsigned* p_l
     while(off < ctx->size  &&  CH(off) == _T(' '))
         off++;
     *p_beg = off;
+    *p_end = off;
     return TRUE;
 }