bug-groff
[Top][All Lists]
Advanced

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

[bug #50771] mdoc(7) .Lk intends to handle punctuation, but fails to do


From: Ingo Schwarze
Subject: [bug #50771] mdoc(7) .Lk intends to handle punctuation, but fails to do so
Date: Sun, 9 Apr 2017 19:04:55 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; OpenBSD amd64; rv:52.0) Gecko/20100101 Firefox/52.0

URL:
  <http://savannah.gnu.org/bugs/?50771>

                 Summary: mdoc(7) .Lk intends to handle punctuation, but fails
to do so
                 Project: GNU troff
            Submitted by: schwarze
            Submitted on: Sun 09 Apr 2017 11:04:54 PM UTC
                Severity: 3 - Normal
              Item Group: Incorrect behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

The implementation of the groff_mdoc(7) .Lk (hyperlink) macro contains code to
make sure that the second argument is not punctuation before treating it as a
link text, but the test can never lead to the result "punctuation" because the
initialization of the global variable doc-width is missing before the call to
doc-get-arg-type.  Consequently, even "." is not recognized as punctuation:

  $ nroff -mdoc
 .Lk https://www.example.com/ .

results in:

 .: https://www.example.com/

while the correct result would be:

 https://www.example.com/.

Simple bugfix patch attached.

Problem reported by Anthony Bentley, bentley at openbsd dot org, fix by me.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sun 09 Apr 2017 11:04:54 PM UTC  Name: Lk-punct.patch  Size: 474B   By:
schwarze

<http://savannah.gnu.org/bugs/download.php?file_id=40340>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?50771>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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