groff-commit
[Top][All Lists]
Advanced

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

[groff] 13/14: tmac/an.tmac: Fix code style nit.


From: G. Branden Robinson
Subject: [groff] 13/14: tmac/an.tmac: Fix code style nit.
Date: Thu, 22 Feb 2024 17:49:16 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit 073c46ef5271d885af50456fb7f02c38ad06c33d
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Feb 21 22:39:18 2024 -0600

    tmac/an.tmac: Fix code style nit.
    
    ...and clarify comment.
    
    There's no need to quote the "|" symbol, and we don't need a conditional
    block for a single input line.
---
 tmac/an.tmac | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tmac/an.tmac b/tmac/an.tmac
index 06b53b8aa..e5710d9cc 100644
--- a/tmac/an.tmac
+++ b/tmac/an.tmac
@@ -1130,8 +1130,8 @@ contains unsupported escape sequence
 .  ds an*visible-hyperlink \\$1\" in case there is no link text
 .  \" We want the diversion to format as if it has an indentation of
 .  \" zero (that comes for free when we switch environments), and we
-.  \" want the line length reduced by the amount of indentation that
-.  \" obtains when we output it.
+.  \" want the line length reduced by the amount of indentation in
+.  \" effect at the start of the link text.
 .  nr an*saved-line-length \\n[.l]
 .  nr an*saved-indentation \\n[.i]
 .  if \\n[an*do-hyperlink] \{\
@@ -1163,9 +1163,8 @@ contains unsupported escape sequence
 .    ie \\n[dl] \{\
 .      if '\*[.T]'html' \
 .        nop \X'html:<a href="\\*[an*hyperlink]">'\c
-.      if '\*[.T]'pdf' \{\
-.        pdfhref W -D \\*[an*hyperlink] -- "|"
-.      \}
+.      if '\*[.T]'pdf' \
+.        pdfhref W -D \\*[an*hyperlink] -- |
 .      if \\n[an*is-output-terminal] \
 .        nop \X'tty: link \\*[an*hyperlink]'\c
 .      \" Replace the final newline of the diversion.
@@ -1181,7 +1180,8 @@ contains unsupported escape sequence
 .      nop \&\\*[an*trailing-text]\"
 .    \}
 .    \" If there was no link text, format URI as its own link text.  We
-.    \" don't add angle brackets here.
+.    \" don't add angle brackets here; we assume that the application
+.    \" uses some means of indicating the hyperlinked text.
 .    el \{\
 .      if '\*[.T]'html' \
 .        nop \X'html:<a href="\\*[an*hyperlink]">\



reply via email to

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