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/


_______________________________________________
bug-groff mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-groff

Reply via email to