bugGNU troff - Bugs: bug #55154, .tr has undocumented and...

 
 

bug #55154: .tr has undocumented and inconsistennt space-character restrictions

Submitted by:  Dave <barx>
Submitted on:  Mon 03 Dec 2018 12:18:36 PM UTC  
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 03 Dec 2018 12:53:07 PM UTC, comment #1: 

It turns out this bug tracker has stripped the trailing spaces from my sample code, so pasting it from the bug description won't work.  I've put a correct copy in an attachment.

(file #45569)

Dave <barx>
Mon 03 Dec 2018 12:18:36 PM UTC, original submission:  

This bug exists in groff 1.22.2 and in a groff built from the latest source in git.

Consider this groff input.  (The first and third lines end in a space.)

.tr a
.tr b\~
.tr c\
.tr d\|
.tr e\^
.tr f\0

This attempts to translate six alphabetic characters to six different types of space characters.  What it does instead is accept the first two translations and reject the last four:

test:3: normal or special character expected (got `\ ')
test:4: normal or special character expected (got a horizontal space)
test:5: normal or special character expected (got a horizontal space)
test:6: normal or special character expected (got a horizontal space)

The documentation says that the space character cannot be translated, but puts no restrictions on any other character being translated to any type of space character.

And this is not just undocumented but illogically inconsistent: why should a printable character be translatable to one type of space and not another?

Even if groff has worked this way since day one, fixing it won't break backwards compatibility, since such translations were previously disallowed.

Dave <barx>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #45569:  test added by barx (45B - application/octet-stream - input file demonstrating the bug)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by barx (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-12-03 barx Attached File- => Added test, #45569

    Back to the top


    Powered by Savane 3.5