gbranden pushed a commit to branch master
in repository groff.
commit 34cc0c6e3d3a5c601519b198572a224111ad9100
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Aug 20 11:12:08 2025 -0500
[hdtbl]: Fix Savannah #67434.
* contrib/hdtbl/hdtbl.tmac (TH): Confirm (just as `TR` does) that macro
usage occurs within a table context; return early if it doesn't.
Fixes <https://savannah.gnu.org/bugs/?67434>. Thanks to Morten Bo
Johansen for the report.
---
contrib/hdtbl/ChangeLog | 8 ++++++++
contrib/hdtbl/hdtbl.tmac | 4 ++++
2 files changed, 12 insertions(+)
diff --git a/contrib/hdtbl/ChangeLog b/contrib/hdtbl/ChangeLog
index c6fbfe8ed..bd020b747 100644
--- a/contrib/hdtbl/ChangeLog
+++ b/contrib/hdtbl/ChangeLog
@@ -1,3 +1,11 @@
+2025-08-20 G. Branden Robinson <[email protected]>
+
+ * hdtbl.tmac (TH): Confirm (just as `TR` does) that macro usage
+ occurs within a table context; return early if it doesn't.
+
+ Fixes <https://savannah.gnu.org/bugs/?67434>. Thanks to Morten
+ Bo Johansen for the report.
+
2025-08-15 G. Branden Robinson <[email protected]>
* hdtbl.am: Declare dependency of `HDTBLPROCESSEDEXAMPLEFILES`
diff --git a/contrib/hdtbl/hdtbl.tmac b/contrib/hdtbl/hdtbl.tmac
index af2f224f9..e901a22b2 100644
--- a/contrib/hdtbl/hdtbl.tmac
+++ b/contrib/hdtbl/hdtbl.tmac
@@ -310,6 +310,10 @@ along with this program. If not, see
<http://www.gnu.org/licenses/>.
.\" else like .TD
.de TH
. ft 1
+. if !\\n[t*#] \{\
+. tm \\n[.F]:\\n[.c]: Table heading (.TH) without preceding table start
(.TBL).
+. return
+. \}
. t*getarg hal \\$@
. if "\\*[hal]"" \
. ds hal c\"
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit