Commit 2750d9fa3b24a48766d252fdc35a2484178a92c0

Martin Mitas 2024-01-13T00:02:12

Add tags <h2>...<h6> as triggers for HTML block type 6. Fixes #214.

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 655a016..2e7629c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -95,6 +95,9 @@ Fixes:
    The `md2html` utility now handles nested images with optional titles
    correctly.
 
+ * [#214](https://github.com/mity/md4c/issues/214):
+   Tags `<h2>` ... `<h6>` incorrectly did not trigger HTML block.
+
 
 ## Version 0.4.8
 
diff --git a/src/md4c.c b/src/md4c.c
index a8f33fe..15e9bd2 100644
--- a/src/md4c.c
+++ b/src/md4c.c
@@ -5369,7 +5369,8 @@ static const TAG d6[] = { X("dd"), X("details"), X("dialog"), X("dir"),
                           X("div"), X("dl"), X("dt"), Xend };
 static const TAG f6[] = { X("fieldset"), X("figcaption"), X("figure"), X("footer"),
                           X("form"), X("frame"), X("frameset"), Xend };
-static const TAG h6[] = { X("h1"), X("head"), X("header"), X("hr"), X("html"), Xend };
+static const TAG h6[] = { X("h1"), X("h2"), X("h3"), X("h4"), X("h5"), X("h6"),
+                          X("head"), X("header"), X("hr"), X("html"), Xend };
 static const TAG i6[] = { X("iframe"), Xend };
 static const TAG l6[] = { X("legend"), X("li"), X("link"), Xend };
 static const TAG m6[] = { X("main"), X("menu"), X("menuitem"), Xend };