gbranden pushed a commit to branch master
in repository groff.
commit 0a8f48ec50667a5f37d14fd64e70880d6f8e8e61
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Oct 4 08:16:20 2025 -0500
[mdoc]: Regression-test long URI non-hyphenation.
Regression-test non-hyphenation of lengthy URIs that format as their own
link text due to the document specifying none between `MT` and `ME` or
`UR` and `UE` macro calls.
* tmac/tests/doc_do-not-hyphenate-hyperlink-with-no-link-text.sh: Add
test.
* tmac/tmac.am (tmac_TESTS): Run test.
---
ChangeLog | 10 +++++
...do-not-hyphenate-hyperlink-with-no-link-text.sh | 51 ++++++++++++++++++++++
tmac/tmac.am | 1 +
3 files changed, 62 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 4806d5388..9c67ba91b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2025-10-04 G. Branden Robinson <[email protected]>
+
+ [mdoc]: Regression-test non-hyphenation of lengthy URIs that
+ format as their own link text due to the document specifying
+ none between `MT` and `ME` or `UR` and `UE` macro calls.
+
+ * tmac/tests/\
+ doc_do-not-hyphenate-hyperlink-with-no-link-text.sh: Add test.
+ * tmac/tmac.am (tmac_TESTS): Run test.
+
2025-10-04 G. Branden Robinson <[email protected]>
* tmac/an.tmac (an*end-hyperlink): Suppress automatic
diff --git a/tmac/tests/doc_do-not-hyphenate-hyperlink-with-no-link-text.sh
b/tmac/tests/doc_do-not-hyphenate-hyperlink-with-no-link-text.sh
new file mode 100755
index 000000000..4d8ac40c4
--- /dev/null
+++ b/tmac/tests/doc_do-not-hyphenate-hyperlink-with-no-link-text.sh
@@ -0,0 +1,51 @@
+#!/bin/sh
+#
+# Copyright 2025 G. Branden Robinson
+#
+# This file is part of groff.
+#
+# groff is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+groff="${abs_top_builddir:-.}/test-groff"
+
+fail=
+
+wail() {
+ echo ...FAILED >&2
+ fail=yes
+}
+
+input='.
+.Dd 2025-10-03
+.Dt foo 1
+.Os "groff test suite"
+.Sh Name
+.Nm foo
+.Nd frobnicate a bar
+.Sh Description
+Sed ut perspiciatis, unde omnis isteXXX
+The latest version is always available from
+.Lk ftp://\:ftp.gnu.org/\:pub/\:gnu/\:bash/
+and
+.Lk http://\:git\:.savannah\:.gnu\:.org/\:cgit/\:bash\:.git/\
+\:snapshot/\:bash\-master\:.tar.\:gz
+.'
+
+# Use a short line length to provoke a break within the URL.
+output=$(printf "%s\n" "$input" \
+ | "$groff" -rLL=65n -mdoc -T ascii -P -cbou)
+echo "$output"
+echo "$output" | grep -q 'bash-master'
+
+# vim:set autoindent expandtab shiftwidth=4 tabstop=4 textwidth=72:
diff --git a/tmac/tmac.am b/tmac/tmac.am
index a3414e02b..352332443 100644
--- a/tmac/tmac.am
+++ b/tmac/tmac.am
@@ -207,6 +207,7 @@ tmac_TESTS = \
tmac/tests/doc_accept-mixed-case-section-headings.sh \
tmac/tests/doc_adjustment-mode-restoration-works.sh \
tmac/tests/doc_degenerate-input-uses-sane-page-length.sh \
+ tmac/tests/doc_do-not-hyphenate-hyperlink-with-no-link-text.sh \
tmac/tests/doc_do-not-loop-infinitely-when-shortening-headers.sh \
tmac/tests/doc_heading-font-remapping-works.sh \
tmac/tests/doc_hyphenation-mode-restoration-works.sh \
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit