gbranden pushed a commit to branch master
in repository groff.

commit 61facb9f027bb7c66fc3040d3839bff84f73d61c
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu Sep 11 10:50:28 2025 -0500

    [troff]: "Asciify" (plain) space nodes as nothing.
    
    (Plain space nodes--contrast word space nodes and others--are produced
    by the formatter with a width of zero (`H0`) in nearly all cases.  The
    exception is when a space node is copied, which case the destination
    space node gets whatever width its source had.)
    
    * src/roff/troff/node.cpp (space_node::asciify): Simplify; member
      function now simply deletes `this`.
---
 ChangeLog               | 11 +++++++++++
 src/roff/troff/node.cpp |  9 ++-------
 2 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f79ad5749..f56909cc0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2025-09-11  G. Branden Robinson <[email protected]>
+
+       [troff]: "Asciify" (plain) space nodes as nothing.  (Plain space
+       nodes--contrast word space nodes and others--are produced by the
+       formatter with a width of zero (`H0`) in nearly all cases.  The
+       exception is when a space node is copied, which case the
+       destination space node gets whatever width its source had.)
+
+       * src/roff/troff/node.cpp (space_node::asciify): Simplify;
+       member function now simply deletes `this`.
+
 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 6b5addbb2..f94fd1c1e 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -3993,14 +3993,9 @@ void space_char_hmotion_node::asciify(macro *m)
   delete this;
 }
 
-void space_node::asciify(macro *m)
+void space_node::asciify(macro *)
 {
-  if (was_escape_colon) {
-    m->append(ESCAPE_COLON);
-    delete this;
-  }
-  else
-    m->append(this);
+  delete this;
 }
 
 void word_space_node::asciify(macro *m)

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

Reply via email to