gbranden pushed a commit to branch master
in repository groff.
commit bc58010d9b15038841a5c2a6eff66e096bf39898
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Jan 29 16:31:27 2024 -0600
[man]: Refactor diversion management (5/7).
* tmac/an.tmac (an*end-hyperlink): Revise emission of link text
diversion.
---
ChangeLog | 1 +
tmac/an.tmac | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 462eef913..9e32b1fa8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,7 @@
`an*link-text-div` to `an*link-text`.
(an-write-paragraph-tag, an*end-hyperlink): Delete diversions
after using them.
+ (an*end-hyperlink): Revise emission of link text diversion.
2024-01-28 G. Branden Robinson <[email protected]>
diff --git a/tmac/an.tmac b/tmac/an.tmac
index 7b30d51d1..064956abb 100644
--- a/tmac/an.tmac
+++ b/tmac/an.tmac
@@ -1153,10 +1153,11 @@ contains unsupported escape sequence
. \}
. if \\n[an*is-output-terminal] \
. nop \X^tty: link \\*[an*prefix]\\*[an*hyperlink]^\c
-. \" Strip off the final newline of the diversion and emit it.
+. \" Replace the final newline of the diversion.
. chop an*link-text
+. as an*link-text \&\c
. an*link-text
-\c\" XXX: If we .nop this, HTML output is corrupted (Savannah #63470).
+. nop \"
. if '\*[.T]'html' \
. nop \X^html:</a>^\c
. if \\n[an*is-output-terminal] \
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit