[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #64356] [PATCH] [troff] tag use of '\~' with 'w' command
From: |
G. Branden Robinson |
Subject: |
[bug #64356] [PATCH] [troff] tag use of '\~' with 'w' command |
Date: |
Wed, 28 Jun 2023 09:30:05 -0400 (EDT) |
Update of bug #64356 (project groff):
Status: None => In Progress
Assigned to: None => gbranden
Summary: [troff] tag use of '\~' with 'w' command => [PATCH]
[troff] tag use of '\~' with 'w' command
_______________________________________________________
Follow-up Comment #1:
diff --git a/ChangeLog b/ChangeLog
index b250e3f1c..d18e156e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-06-27 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * src/roff/troff/node.cpp (unbreakable_space_node::tprint):
+ Write word marker ('w' "command") to output.
+ * NEWS: Add item.
+
+ Fixes <https://savannah.gnu.org/bugs/?64356>.
+
2023-06-24 G. Branden Robinson <g.branden.robinson@gmail.com>
* src/roff/troff/input.cpp (while_request): Trivially refactor.
diff --git a/NEWS b/NEWS
index 6570ae1e2..1d6cf3c2f 100644
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,10 @@ VERSION next
troff
-----
+o GNU troff output now reports unbreakable spaces (those produced with
+ the `\~` escape sequence) as word breaks with the documentary 'w'
+ command, just as regular breakable spaces do.
+
o In nroff mode (in other words, when producing output for terminal
devices), the formatter now reports warning diagnostics regarding
certain output problems using units of lines instead of inches (or the
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index 152dfda1b..341edce1f 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -5828,6 +5828,7 @@ int word_space_node::is_tag()
void unbreakable_space_node::tprint(troff_output_file *out)
{
out->fill_color(col);
+ out->word_marker();
if (is_html) {
// we emit the space width as a negative glyph index
out->flush_tbuf();
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?64356>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/