groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 09/18: [troff]: Fix Savannah #64356.


From: G. Branden Robinson
Subject: [groff] 09/18: [troff]: Fix Savannah #64356.
Date: Tue, 25 Jul 2023 05:49:17 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 5f6e012a5b67972c4fb9a915cb315fe758936b56
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Jul 21 07:02:30 2023 -0500

    [troff]: Fix Savannah #64356.
    
    * src/roff/troff/node.cpp (unbreakable_space_node::tprint): Write word
      marker ('w' command) to output.
    
    * doc/groff.texi (Simple Commands):
    * man/groff_out.5.man (Simple commands): Document it.
    
    * NEWS: Add item.
    
    Fixes <https://savannah.gnu.org/bugs/?64356>.
---
 ChangeLog               | 8 ++++++++
 NEWS                    | 4 ++++
 doc/groff.texi          | 6 +++---
 man/groff_out.5.man     | 9 ++++-----
 src/roff/troff/node.cpp | 1 +
 5 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ff0daf0df..c496ddb88 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-07-21  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-07-21  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * tmac/papersize.tmac: Set register `#R_MARGIN` for mom(7)'s
diff --git a/NEWS b/NEWS
index ea3a189d5..92a895cf2 100644
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,10 @@ o In nroff mode (in other words, when producing output for 
terminal
   unit configured with the `warnscale` request) to describe the vertical
   drawing position where the problem occurred.
 
+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.
+
 eqn
 ---
 
diff --git a/doc/groff.texi b/doc/groff.texi
index b8b3b3c3a..bf6e44619 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -17843,9 +17843,9 @@ such values, but @code{groff}'s output driver library 
handles them.
 
 @item w
 Indicate an inter-word space.  No action is performed; the command is
-present to make the output more easily parsed.  Only adjustable,
-breakable inter-word spaces are thus described; those resulting from
-@code{\~} or horizontal motion escape sequences are not.  GNU
+present to make the output more easily parsed.  Only inter-word spaces
+on an output line (be they breakable or not) are thus described; those
+resulting from horizontal motion escape sequences are not.  GNU
 @code{troff} issues this command but @code{groff}'s output driver
 library ignores it.  See @code{h} and @code{H} above.
 @end table
diff --git a/man/groff_out.5.man b/man/groff_out.5.man
index 9c1534e2e..a6b7b1e0f 100644
--- a/man/groff_out.5.man
+++ b/man/groff_out.5.man
@@ -822,11 +822,10 @@ Indicate an inter-word space.
 No action is performed;
 the command is present to make the output more easily parsed.
 .
-Only adjustable,
-breakable inter-word spaces are thus described;
-those resulting from
-.B \[rs]\[ti]
-or horizontal motion escape sequences are not.
+Only inter-word spaces on an output line
+(be they breakable or not)
+are thus described;
+those resulting from horizontal motion escape sequences are not.
 .
 GNU
 .I troff \" GNU
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index 4d872189e..85f1b7ec2 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -5833,6 +5833,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 via email to

[Prev in Thread] Current Thread [Next in Thread]