gbranden pushed a commit to branch master
in repository groff.

commit 3ec6fe347dfb304533d03a2c79175cd6f3d1e5b2
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Dec 29 02:04:27 2023 -0600

    [tbl]: Revise diagnostic message.
    
    * src/preproc/tbl/table.cpp (table::add_entry): Recast diagnostic when
      user attempts to put a text block in a table cell classified as
      numeric, and demote it from error to warning since the program falls
      back to left alignment.
---
 ChangeLog                 | 7 +++++++
 src/preproc/tbl/table.cpp | 4 +++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 413c0d1f6..5261ec83a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2023-12-29  G. Branden Robinson <[email protected]>
+
+       * src/preproc/tbl/table.cpp (table::add_entry): Recast
+       diagnostic when user attempts to put a text block in a table
+       cell classified as numeric, and demote it from error to warning
+       since the program falls back to left alignment.
+
 2023-12-27  G. Branden Robinson <[email protected]>
 
        [troff]: Add another explicit mechanism for disabling
diff --git a/src/preproc/tbl/table.cpp b/src/preproc/tbl/table.cpp
index c288a65af..e5b7125c6 100644
--- a/src/preproc/tbl/table.cpp
+++ b/src/preproc/tbl/table.cpp
@@ -1621,7 +1621,9 @@ void table::add_entry(int r, int c, const string &str,
     case FORMAT_NUMERIC:
       if (!str.empty()) {
        if (is_block) {
-         error_with_file_and_line(fn, ln, "can't have numeric text block");
+         warning_with_file_and_line(fn, ln, "treating text block in"
+                                    " table entry with numeric format"
+                                    " as left-aligned");
          e = new left_block_entry(this, f, s);
        }
        else {

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

Reply via email to