groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] Hyperlink macros: breaking should conserve the full hyperlink


From: Alejandro Colomar (man-pages)
Subject: Re: [BUG] Hyperlink macros: breaking should conserve the full hyperlink
Date: Mon, 7 Feb 2022 23:12:59 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1

Hi Branden!

On 2/7/22 22:53, G. Branden Robinson wrote:
> Hi, Alex!
> 
> At 2022-02-07T19:58:33+0100, Alejandro Colomar (man-pages) wrote:
>> Hi Branden,
>>
>> I realized that when you break a hyperlink, the terminal shows an
>> incorrect link.
>>
>> For the following code:
>>
>> [
>> See:
>> .UR
>> https://www.kernel.org/\:doc/\:html/\:latest/\:process/\:coding-style.html\:#allocating-memory
>> .UE
>> ]
>>
>> I see the following output:
>>
>> [
>>                      See:
>> ⟨https://www.kernel.org/doc/html/latest/process/
>>                      coding-style.html#allocating-memory⟩
>> ]
> 
> The foregoing is not correct usage of the `UR` macro.  The `UR` macro
> takes the URI as its _argument_, and then the link text (the visible
> part) is what appears _between_ the `UR` and `UE` macros.

Hmmmm, groff_man(7) isn't explicit in the need for a link text for
.UR/.UE or .MT/.ME.  Is it really needed?  What if the link text should
be exactly the URI?  Why repeat it?

> 
>        .UR uri
>        .UE [trailing-text]
>               Identify uri as an RFC 3986 URI hyperlink with the text
>               between the two macro calls as the link text.  An argument
>               to .UE is placed at the end of the link text without
>               intervening space.  uri may not be visible in the rendered
>               document if the output driver supports hyperlinks.  If it
>               does not, uri is set in angle brackets after the link text
>               and before trailing-text.
> 
>> And XFCE terminal highlights as a hyperlink _only_ the part that is on
>> the first line (i.e., up to 'process/').  The second part (i.e.,
>> 'coding'...) isn't highlighted, and most importantly, isnt' part of the
>> hyperlink.
> 
> You might say that `UR` is "generous in what it accepts".  If it has no
> argument, it attempts to create a hyperlink out of the link text.  It
> doesn't do a very good job.

It's actually the other way around, I think.  I provided the URI
(hyperlink), and I omitted the link text.  It shouldn't fail to create a
hyperlink, since the URI, which I provided, is sufficient and necessary
to create a hyperlink.

> Please check the corrected example in the attachment and see if it
> behaves better for you.
> 

I see no attachment :/

Regards,

Alex

-- 
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]