gbranden pushed a commit to branch master
in repository groff.

commit fdcf15088b4e5b94ad49b074e3a24feafda3b1cf
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Sep 17 19:05:30 2025 -0500

    [troff]: Asciify diverted space nodes as nothing.
    
    (Diverted space nodes are produced by the `sp` request in a diversion.)
    
    * src/roff/troff/node.h (class diverted_space_node): Declare `asciify`
      member function, thus overriding base class.
    
    * src/roff/troff/node.cpp (diverted_space_node::asciify): New member
      function simply does nothing.
---
 ChangeLog               | 7 +++++++
 src/roff/troff/node.cpp | 4 ++++
 src/roff/troff/node.h   | 1 +
 3 files changed, 12 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 18480296d..5ea843026 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2025-09-14  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/node.h (class diverted_space_node): Declare
+       `asciify` member function, thus overriding base class.
+       * src/roff/troff/node.cpp (diverted_space_node::asciify): New
+       member function simply does nothing.
+
 2025-09-14  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 c065735c5..ae41f0f23 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -4038,6 +4038,10 @@ void bracket_node::asciify(macro *)
 {
 }
 
+void diverted_space_node::asciify(macro *)
+{
+}
+
 void hyphen_inhibitor_node::asciify(macro *)
 {
 }
diff --git a/src/roff/troff/node.h b/src/roff/troff/node.h
index 040d54e80..02f475cf8 100644
--- a/src/roff/troff/node.h
+++ b/src/roff/troff/node.h
@@ -289,6 +289,7 @@ public:
   diverted_space_node(vunits, node * /* p */ = 0 /* nullptr */);
   diverted_space_node(vunits, statem *, int,
                      node * /* p */ = 0 /* nullptr */);
+  void asciify(macro *);
   node *copy();
   bool need_reread(bool *);
   bool is_same_as(node *);

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

Reply via email to