gbranden pushed a commit to branch master
in repository groff.

commit 8e458a0ab15bd3b7a20e69b2f7130769be6f983a
Author: G. Branden Robinson <[email protected]>
AuthorDate: Tue Jul 14 02:56:12 2026 -0500

    [troff]: Fix Savannah #68524.
    
    * src/roff/troff/env.cpp (load_hyphenation_patterns_from_file_request)
      (append_hyphenation_patterns_from_file_request): Before returning,
      call `tok.next()` instead of `skip_line()`.  Annotate why: doing so
      prevents the formatter from ignoring the input line after the request.
    
    Fixes <https://savannah.gnu.org/bugs/?68524>.  Problem introduced by me
    in commit 85c8daa27d, 1 April.  Thanks to Dave Kemper for the report.
---
 ChangeLog              | 13 +++++++++++++
 src/roff/troff/env.cpp |  8 ++++++--
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2e979b759..7b5182038 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2026-07-14  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/env.cpp
+       (load_hyphenation_patterns_from_file_request)
+       (append_hyphenation_patterns_from_file_request): Before
+       returning, call `tok.next()` instead of `skip_line()`.  Annotate
+       why: doing so prevents the formatter from ignoring the input
+       line after the request.
+
+       Fixes <https://savannah.gnu.org/bugs/?68524>.  Problem
+       introduced by me in commit 85c8daa27d, 1 April.  Thanks to Dave
+       Kemper for the report.
+
 2026-07-17  G. Branden Robinson <[email protected]>
 
        [groff]: Add unit tests for `hpf` and `hpfa` requests.
diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp
index 37ff2056a..5b2cbaf7c 100644
--- a/src/roff/troff/env.cpp
+++ b/src/roff/troff/env.cpp
@@ -4889,7 +4889,9 @@ static void load_hyphenation_patterns_from_file_request() 
// .hpf
     return;
   }
   update_hyphenation_patterns_from_file(false /* appending */);
-  skip_line();
+  // No skip_line() here; update_hyphenation_patterns_from_file() calls
+  // read_rest_of_line_as_argument().
+  tok.next();
 }
 
 static void append_hyphenation_patterns_from_file_request() // .hpfa
@@ -4901,7 +4903,9 @@ static void 
append_hyphenation_patterns_from_file_request() // .hpfa
     return;
   }
   update_hyphenation_patterns_from_file(true /* appending */);
-  skip_line();
+  // No skip_line() here; update_hyphenation_patterns_from_file() calls
+  // read_rest_of_line_as_argument().
+  tok.next();
 }
 
 // Most hyphenation functionality is environment-specific; see

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

Reply via email to