gbranden pushed a commit to branch master
in repository groff.

commit 8f49c696972160a6a4150bc89d7b6590591bea02
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Aug 24 16:55:24 2024 -0500

    tmac/pdf.tmac: Trivially refactor `pdfbookmark`.
    
    * tmac/pdf.tmac (pdfbookmark): Trivially refactor.  Rename `pdf:cleaned`
      string to `pdf:title` to reflect (1) its use in the emitted PDF device
      control command and (2) the fact that it is no longer sanitized by
      emitting it into a diversion and invoking `asciify` on that diversion.
---
 ChangeLog     |  8 ++++++++
 tmac/pdf.tmac | 10 +++++-----
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 34e007d2a..46a2fbec2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-08-23  G. Branden Robinson <[email protected]>
+
+       * tmac/pdf.tmac (pdfbookmark): Trivially refactor.  Rename
+       `pdf:cleaned` string to `pdf:title` to reflect (1) its use in
+       the emitted PDF device control command and (2) the fact that it
+       is no longer sanitized by emitting it into a diversion and
+       invoking `asciify` on that diversion.
+
 2024-08-23  G. Branden Robinson <[email protected]>
 
        * tmac/pdf.tmac (pdfclean): Drop unused macro.
diff --git a/tmac/pdf.tmac b/tmac/pdf.tmac
index 75ec5736b..74a0757eb 100644
--- a/tmac/pdf.tmac
+++ b/tmac/pdf.tmac
@@ -276,23 +276,23 @@ am solely responsible for any bugs I may have introduced 
into this file.
 .      ie '\\*[pdf:href-T]'' .ds PDFBOOKMARK.NAME pdf:bm\\n[pdf:bm.nr]
 .      el .ds PDFBOOKMARK.NAME \\*[pdf:href-T]
 .      pdf:href.sety
-.      ds pdf:cleaned \\$*
+.      ds pdf:title \\$*
 .      if !'\\*[pdf:href-T]'' \{\
 .         nr pdf:bm.nk +1
 .         if !d pdf:bm\\n[pdf:bm.nk].tag \{\
 .            ds pdf:bm\\n[pdf:bm.nk].tag \\*[PDFBOOKMARK.NAME]
-.            ds pdf:bm\\n[pdf:bm.nk].val \\*[pdf:cleaned]
+.            ds pdf:bm\\n[pdf:bm.nk].val \\*[pdf:title]
 .         \}
 .         if d PDF.EXPORT \{\
 .            tm .ds pdf:bm\\n[pdf:bm.nk].tag \\*[PDFBOOKMARK.NAME]
-.            tm .ds pdf:bm\\n[pdf:bm.nk].val \\*[pdf:cleaned]
+.            tm .ds pdf:bm\\n[pdf:bm.nk].val \\*[pdf:title]
 .         \}
 .      \}
 .      pdfmark /Dest /\\*[PDFBOOKMARK.NAME] /View [\\*[PDFBOOKMARK.VIEW]] /DEST
-.      nop \!x X ps:exec [/Dest /\\*[PDFBOOKMARK.NAME] /Title 
(\\*[pdf:cleaned]) /Level \\n[pdf:bm.lev] /OUT pdfmark
+.      nop \!x X ps:exec [/Dest /\\*[PDFBOOKMARK.NAME] /Title (\\*[pdf:title]) 
/Level \\n[pdf:bm.lev] /OUT pdfmark
 .      pdf:href.options.clear
 .      rr PDFPAGE.Y
-.      rm pdf:cleaned
+.      rm pdf:title
 .      \}
 .   \}
 .el \{\

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

Reply via email to