bugGNU troff - Bugs: bug #50789, mdoc(7) .Lk with more than two...

 
 

bug #50789: mdoc(7) .Lk with more than two arguments

Submitted by:  Ingo Schwarze <schwarze>
Submitted on:  Wed 12 Apr 2017 11:30:19 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: WishlistStatus: Fixed
Privacy: PublicAssigned to: Carsten Kunze <carstenkunze>
Open/Closed: ClosedPlanned Release: 1.22.4

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Wed 12 Apr 2017 11:30:19 AM UTC, original submission:

Currently, the .Lk macro exhibits useless and confusing behaviour when given more than two arguments. For example,

.Lk target four words of text

results in

four: target words of text

where "four:" is italic and the rest (even "words of text") is bold. Note that having the ":" italic is also dubious, it would better be roman.

A more useful rendering would be

four words of text: target

Of course, the issue can partially be worked around with quoting:

.Lk target "four words of text"

but than trailing punctuation does not work in the usual way.
Besides, given how common it is to have link texts that consist of more than one word, i'd suggest to just make this more intuitive for the users.

The attached patch does the following:

  • Use the second and following arguments as the link text.
  • Do not mark up the following colon with \fI.
  • Handle any number of trailing delimiters.

It is made availabel under the license already contained in the file, such that it can easily be included into groff.

Unfortunate behaviour reported by Antony <Bentley at OpenBSD dot org>, patch by me, and patch tested by Anthony.

Ingo Schwarze <schwarze>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #40370:  mdoc-Lk.patch added by schwarze (2KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by carstenkunze (Updated the item)
  • -unavailable- added by schwarze (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 15 Apr 2017 09:18:10 AM UTCcarstenkunzeStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>1.22.4
    Thu 13 Apr 2017 08:41:34 PM UTCcarstenkunzeStatusNone=>Ready For Test
      Assigned toNone=>carstenkunze
    Wed 12 Apr 2017 11:30:19 AM UTCschwarzeAttached File-=>Added mdoc-Lk.patch, #40370

    Back to the top


    Powered by Savane 3.1-cleanup1