gbranden pushed a commit to branch master
in repository groff.
commit 897bdec959311c1a900dae116405035c3697805c
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu Sep 11 16:40:19 2025 -0500
[troff]: "Asciify" bracket nodes as nothing.
(Bracket nodes are produced by the `\b` bracket-building escape
sequence.)
* src/roff/troff/node.h (class bracket_node): Declare `asciify` member
function, thus overriding base class.
* src/roff/troff/node.cpp (bracket_node::asciify): New member function
simply deletes `this`.
---
ChangeLog | 10 ++++++++++
src/roff/troff/node.cpp | 5 +++++
src/roff/troff/node.h | 1 +
3 files changed, 16 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index f36640b78..8d0f05bb0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2025-09-11 G. Branden Robinson <[email protected]>
+
+ [troff]: "Asciify" bracket nodes as nothing. (Bracket nodes are
+ produced by the `\b` bracket-building escape sequence.)
+
+ * src/roff/troff/node.h (class bracket_node): Declare `asciify`
+ member function, thus overriding base class.
+ * src/roff/troff/node.cpp (bracket_node::asciify): New member
+ function 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 9a8ebb3bc..147a18ec8 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -4050,6 +4050,11 @@ void vmotion_node::asciify(macro *)
delete this;
}
+void bracket_node::asciify(macro *)
+{
+ delete this;
+}
+
void hyphen_inhibitor_node::asciify(macro *)
{
delete this;
diff --git a/src/roff/troff/node.h b/src/roff/troff/node.h
index 391a4c4b1..040d54e80 100644
--- a/src/roff/troff/node.h
+++ b/src/roff/troff/node.h
@@ -563,6 +563,7 @@ class bracket_node : public container_node {
public:
bracket_node();
bracket_node(statem *, int);
+ void asciify(macro *);
node *copy();
void tprint(troff_output_file *);
void bracket(node *); // add another node to be overstruck
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit