gbranden pushed a commit to branch master
in repository groff.
commit 3d249f79fd662e0e033ee1dc564f242b1a753e3c
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Mar 17 01:19:54 2025 -0500
[troff]: Fix Savannah #55799 (`-a` opt + `char`).
* src/roff/troff/node.cpp (composite_node::ascii_print): When rendering
a composite node for approximate output, traverse into it and write
its nodes' representations in forward order.
Fixes <https://savannah.gnu.org/bugs/?55799>. Thanks to Dave Kemper for
the report. Problem appears to date back to groff's birth.
---
ChangeLog | 10 ++++++++++
src/roff/troff/node.cpp | 7 +------
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c66ec11c1..127f6c0fb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2025-03-17 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/node.cpp (composite_node::ascii_print): When
+ rendering a composite node for approximate output, traverse into
+ it and write its nodes' representations in forward order.
+
+ Fixes <https://savannah.gnu.org/bugs/?55799>. Thanks to Dave
+ Kemper for the report. Problem appears to date back to groff's
+ birth.
+
2025-03-17 G. Branden Robinson <[email protected]>
[groff]: Regression-test Savannah #55799.
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index e4fb3717b..4bc0bf751 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -4680,12 +4680,7 @@ void composite_node::asciify(macro *m)
void composite_node::ascii_print(ascii_output_file *ascii)
{
- unsigned char c = ci->get_ascii_code();
- if (c != 0)
- ascii->outc(c);
- else
- ascii->outs(ci->nm.contents());
-
+ ascii_print_reverse_node_list(ascii, nodes);
}
hyphen_list *composite_node::get_hyphen_list(hyphen_list *tail, int *count)
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit