groff-commit
[Top][All Lists]
Advanced

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

[groff] 08/14: [man]: Trivially refactor (`an*trailing-text`).


From: G. Branden Robinson
Subject: [groff] 08/14: [man]: Trivially refactor (`an*trailing-text`).
Date: Thu, 22 Feb 2024 17:49:16 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit 2c3a18b18c78eb09203e3c3425364e01846f69ee
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Feb 21 21:58:37 2024 -0600

    [man]: Trivially refactor (`an*trailing-text`).
    
    * tmac/an.tmac (an*end-hyperlink): Trivially refactor.  Store the first
      argument in a string named `an*trailing-text` (and use it) to clarify
      later logic.  Delete the string when done.
---
 ChangeLog    | 6 ++++++
 tmac/an.tmac | 6 ++++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index bec0faae9..6598c757d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-02-21  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * tmac/an.tmac (an*end-hyperlink): Trivially refactor.  Store
+       the first argument in a string named `an*trailing-text` (and use
+       it) to clarify later logic.  Delete the string when done.
+
 2024-02-21  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        [man]: Trivially refactor.
diff --git a/tmac/an.tmac b/tmac/an.tmac
index 72352d8cd..bc521b1a3 100644
--- a/tmac/an.tmac
+++ b/tmac/an.tmac
@@ -1153,6 +1153,7 @@ contains unsupported escape sequence
 .\" "mailto:";, but this need not be visible when rendering an email
 .\" address on a device incapable of hyperlinking.
 .de an*end-hyperlink
+.  ds an*trailing-text \\$1\"
 .  ie (\\n[an*is-in-link-text-diversion] & \\n[an*do-hyperlink]) \{\
 .    br
 .    di
@@ -1190,18 +1191,19 @@ contains unsupported escape sequence
 .        nop \X'tty: link \\*[an*hyperlink]'\
 \\*[an*visible-hyperlink]\X'tty: link'\c
 .    \}
-.    nop \&\\$1\"
+.    nop \&\\*[an*trailing-text]\"
 .  \}
 .  \" If not hyperlinking, format URI in angle brackets.  There was no
 .  \" diversion, so the link text has already been formatted normally.
 .  el \{\
 .    nh
-.    nop \\[la]\\*[an*visible-hyperlink]\\[ra]\\$1
+.    nop \\[la]\\*[an*visible-hyperlink]\\[ra]\\*[an*trailing-text]
 .    hy \\n[an*hyphenation-mode]
 .  \}
 .  rm an*link-text
 .  rm an*hyperlink
 .  rm an*visible-hyperlink
+.  rm an*trailing-text
 ..
 .
 .\" Begin email hyperlink.  Input until the next `ME` call is stored in



reply via email to

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