URL: <https://savannah.gnu.org/bugs/?64453>
Summary: [grohtml] man+IP+UR with empty link text sends state machine into wilderness Group: GNU roff Submitter: gbranden Submitted: Fri 21 Jul 2023 09:37:30 AM UTC Category: Driver grohtml Severity: 3 - Normal Item Group: Incorrect behaviour Status: Confirmed Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Planned Release: None _______________________________________________________ Follow-up Comments: ------------------------------------------------------- Date: Fri 21 Jul 2023 09:37:30 AM UTC By: G. Branden Robinson <gbranden> Originally reported by Jakub Wilk as [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1018965 Debian #1018965]. Reproducer: $ cat ATTIC/IP-UR.man .TH .IP 1. 4 .UR https://bar.example .UE A workaround is not to leave the text empty, though that is supported (and used by _groff_'s own man pages, in _grotty_(1) and _pic_(1)). It won't do to just blindly stick a <td> in front of the link text in this case: diff --git a/tmac/an.tmac b/tmac/an.tmac index 33e88be62..732eb026a 100644 --- a/tmac/an.tmac +++ b/tmac/an.tmac @@ -1105,8 +1105,9 @@ contains unsupported escape sequence . \" If there was no link text, format URI as its own link text. We . \" don't add angle brackets here. . el \{\ +. an-warn GBR: no URI . if \\n[an*is-output-html] \ -. nop \X^html:<a href="\\*[an*prefix]\\*[an*hyperlink]">\ +. nop \X^html:<td><a href="\\*[an*prefix]\\*[an*hyperlink]">\ \\*[an*hyperlink]</a>^\c . if \\n[an*is-output-terminal] \ . nop \X^tty: link \\*[an*prefix]\\*[an*hyperlink]^\ ...since that introduces spurious `td` tags into URIs without linked text that are not in "lists" (indented paragraphs). My surmise is that the state machine _grohtml_ uses has gotten confused. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?64453> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/