Commit faf39849db516de67b18326f3430a75096e26f9c

Martin Mitas 2024-01-21T11:42:30

md_is_html_cdata: Remove not needed max_end shrinking. md_scan_for_html_closer() handles that internally.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/md4c.c b/src/md4c.c
index 17709a0..6425d0c 100644
--- a/src/md4c.c
+++ b/src/md4c.c
@@ -1275,9 +1275,6 @@ md_is_html_cdata(MD_CTX* ctx, const MD_LINE* lines, int n_lines, OFF beg, OFF ma
         return FALSE;
     off += open_size;
 
-    if(lines[n_lines-1].end < max_end)
-        max_end = lines[n_lines-1].end - 2;
-
     return md_scan_for_html_closer(ctx, _T("]]>"), 3,
                 lines, n_lines, off, max_end, p_end, &ctx->html_cdata_horizon);
 }