gbranden pushed a commit to branch master
in repository groff.
commit f6143389767630cd32ec47bc3072f05143cdbd2c
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Jan 30 09:12:36 2023 -0600
[tbl]: Fix Savannah #63731.
* src/preproc/tbl/main.cpp (process_format): Throw error diagnostic if
more than 2 vertical lines are specified at the beginning of a row
definition.
Fixes <https://savannah.gnu.org/bugs/?63731>.
---
ChangeLog | 8 ++++++++
src/preproc/tbl/main.cpp | 6 ++++++
2 files changed, 14 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 268dbf7aa..956b47b8b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-01-30 G. Branden Robinson <[email protected]>
+
+ * src/preproc/tbl/main.cpp (process_format): Throw error
+ diagnostic if more than 2 vertical lines are specified at the
+ beginning of a row definition.
+
+ Fixes <https://savannah.gnu.org/bugs/?63731>.
+
2023-01-30 G. Branden Robinson <[email protected]>
* src/preproc/tbl/main.cpp (process_format): Recast diagnostic
diff --git a/src/preproc/tbl/main.cpp b/src/preproc/tbl/main.cpp
index ed831e8bb..feb94b4a1 100644
--- a/src/preproc/tbl/main.cpp
+++ b/src/preproc/tbl/main.cpp
@@ -838,8 +838,14 @@ format *process_format(table_input &in, options *opt,
got_period = true;
break;
case '|':
+ // leading vertical line in row
opt->flags |= table::HAS_TOP_VLINE;
vline_count++;
+ if (vline_count > 2) {
+ vline_count = 2;
+ error("more than 2 vertical lines at beginning of row"
+ " description");
+ }
break;
case ' ':
case '\t':
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit