gbranden pushed a commit to branch master
in repository groff.

commit 4b09e1688cd79808bc2142e1694f73c33cce3d4a
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Dec 19 23:37:58 2025 -0600

    [troff]: Warn on ambiguous delimiter in `tl` req.
    
    * src/roff/troff/input.cpp (read_title_parts): Throw deprecation warning
      in category "delim" if the delimiter is invalid and we're not in
      compatibility mode.  This is a training wheel to get people off of
      ambiguous delimiters.  See Savannah #66009.
---
 ChangeLog                | 7 +++++++
 src/roff/troff/input.cpp | 3 +++
 2 files changed, 10 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index ec11cbd4f..75dca3fec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2025-12-19  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/input.cpp (read_title_parts): Throw deprecation
+       warning in category "delim" if the delimiter is invalid and
+       we're not in compatibility mode.  This is a training wheel to
+       get people off of ambiguous delimiters.  See Savannah #66009.
+
 2025-12-19  G. Branden Robinson <[email protected]>
 
        * src/roff/groff/tests/check-delimiter-validity.sh: Improve
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 59d4b15aa..e88f3e8bb 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -6428,6 +6428,9 @@ void read_title_parts(node **part, hunits *part_width)
   if (!has_arg())
     return;
   token start(tok);
+  if (!want_att_compat && !tok.is_usable_as_delimiter())
+    warning(WARN_DELIM, "using %1 as a title request delimiter"
+                       " is deprecated", tok.description());
   int start_level = input_stack::get_level();
   tok.next();
   for (int i = 0; i < 3; i++) {

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

Reply via email to