Commit e950096b53fcdbbf25f193cf38ee14d93fe1442e

Martin Mitas 2016-10-08T21:09:55

Fix misdetection of HTML block starting condition type 7. The condition cannot span over multiple lines.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/md4c/md4c.c b/md4c/md4c.c
index 831a9eb..e9acf19 100644
--- a/md4c/md4c.c
+++ b/md4c/md4c.c
@@ -351,7 +351,7 @@ md_is_html_tag(MD_CTX* ctx, const MD_LINE* lines, int n_lines, OFF beg, OFF* p_e
     /* (Optional) attributes (if not closer), (optional) '/' (if not closer)
      * and final '>'. */
     while(1) {
-        while(off < line_end) {
+        while(off < line_end  &&  !ISNEWLINE(off)) {
             if(attr_state > 40) {
                 if(attr_state == 41 && ISANYOF(off, _T("\"'=<>`"))) {
                     attr_state = 0;