bugGNU roff - Bugs: bug #64453, [grohtml] man+IP+UR with empty...

 
 

bug #64453: [grohtml] man+IP+UR with empty link text sends state machine into wilderness

Submitter:  G. Branden Robinson <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 Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 21 Jul 2023 09:37:30 AM UTC, original submission:  

Originally reported by Jakub Wilk as 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.

G. Branden Robinson <gbranden>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gbranden (original reporter)
  • -email is unavailable- added by gbranden (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-07-21 gbranden Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code