deri pushed a commit to branch master
in repository groff.

commit 5c6e3f5601f37b285a9cc0a5993fcff3fb3bbcf6
Author: Deri James <[email protected]>
AuthorDate: Sun Jan 18 14:11:55 2026 +0000

    [gropdf.pl]: stop 'Unknown' text appearing
    
    * src/devices/gropdf/gropdf.pl (.pdf*href): For external
    hotspot links (.pdfhref W  [-D URI] [-P prefix-text] \
    [-A affixed-text] [--] [hotlink text]), if no 'hotlink text'
    is specified but an URI is given, use it as the text
    rather than 'Unknown'.
    
    Fixes <https://savannah.gnu.org/bugs/?67916>. Thanks to
    Branden Robinson for the suggested improvement.
---
 ChangeLog     | 11 +++++++++++
 tmac/pdf.tmac |  9 +++++++--
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4b19cf898..9e2c8be55 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2026-01-18  Deri James  <[email protected]>
+
+       * src/devices/gropdf/gropdf.pl (.pdf*href): For external
+       hotspot links (.pdfhref W  [-D URI] [-P prefix-text] \
+       [-A affixed-text] [--] [hotlink text]), if no 'hotlink text'
+       is specified but an URI is given, use it as the text
+       rather than 'Unknown'.
+
+       Fixes <https://savannah.gnu.org/bugs/?67916>. Thanks to
+       Branden Robinson for the suggested improvement.
+
 2026-01-15  G. Branden Robinson <[email protected]>
 
        * src/devices/gropdf/gropdf.1.man (Macros) <pdfbookmark>
diff --git a/tmac/pdf.tmac b/tmac/pdf.tmac
index 3bf6a25b6..c43103b9a 100644
--- a/tmac/pdf.tmac
+++ b/tmac/pdf.tmac
@@ -718,9 +718,14 @@ with '-A' option
 .      \}
 .   el \{\
 .      ds PDFHREF.DESC Unknown
-.      pdf:lookup \\*[pdf:href-D]
-.      if !'\\*[pdf:lookup-result]'' .ds PDFHREF.DESC \\*[pdf:lookup-value]
+.      ie '\\*[pdf*href.class]'W' \{\
+.         if !'\\*[pdf:href-D]'' .ds PDFHREF.DESC \\*[pdf:href-D]
 .      \}
+.      el \{\
+.         pdf:lookup \\*[pdf:href-D]
+.         if !'\\*[pdf:lookup-result]'' .ds PDFHREF.DESC \\*[pdf:lookup-value]
+.      \}
+.   \}
 .   \" Apply border and colour specifications to the PDFMARK string
 .   \" definition, as required.
 .   \"

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to