gbranden pushed a commit to branch master
in repository groff.

commit c850f3b3cf41263514c801c89f48ccb174c5b564
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu Sep 11 10:20:37 2025 -0500

    [troff]: Asciify `\~` as space, not ESCAPE_TILDE.
    
    * src/roff/troff/node.cpp (unbreakable_space_node::asciify): Asciify an
      unbreakable space node (the kind produced by the `\~` escape sequence)
      as an ordinary space instead of an `ESCAPE_TILDE` token.  The latter
      is not necessary for the `asciify` request's revised charter (and only
      known application to date) of making diversion contents fit for use as
      device extension command arguments.
---
 ChangeLog               | 10 ++++++++++
 src/roff/troff/node.cpp |  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 308aa28df..2d64b793f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2025-09-11  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/node.cpp (unbreakable_space_node::asciify):
+       Asciify an unbreakable space node (the kind produced by the `\~`
+       escape sequence) as an ordinary space instead of an
+       `ESCAPE_TILDE` token.  The latter is not necessary for the
+       `asciify` request's revised charter (and only known application
+       to date) of making diversion contents fit for use as device
+       extension command arguments.
+
 2025-09-11  G. Branden Robinson <[email protected]>
 
        * src/roff/groff/tests/asciify-request-works.sh: Add test case
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index 1b6d3d57f..6b5addbb2 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -4012,7 +4012,7 @@ void word_space_node::asciify(macro *m)
 
 void unbreakable_space_node::asciify(macro *m)
 {
-  m->append(ESCAPE_TILDE);
+  m->append(' ');
   delete this;
 }
 

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

Reply via email to