gbranden pushed a commit to branch master
in repository groff.
commit 53230f8b942709e69ea56ffb78007555e7b014af
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Aug 8 02:07:58 2025 -0500
[tbl]: Improve diagnostic.
* src/preproc/tbl/table.cpp (table::add_entry): Indexed characters are
also valid fodder for the `\R` character repetition token.
Exhibit:
$ cat ATTIC/tbl-repeat-an-indexed-char.roff
.TS
L.
obsequious
\R\N'65'
.TE
.pl \n(nlu
$ nroff -t ATTIC/tbl-repeat-an-indexed-char.roff | cat -s
obsequious
AAAAAAAAAA
---
ChangeLog | 6 ++++++
src/preproc/tbl/table.cpp | 3 ++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index cb33e74db..2283cf018 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-08-08 G. Branden Robinson <[email protected]>
+
+ * src/preproc/tbl/table.cpp (table::add_entry): Improve
+ diagnostic. Indexed characters are also valid fodder for the
+ `\R` character repetition token.
+
2025-08-07 G. Branden Robinson <[email protected]>
* doc/ms.ms.in: Revise parameter table layout. Make it fit
diff --git a/src/preproc/tbl/table.cpp b/src/preproc/tbl/table.cpp
index af20d8686..80759ca55 100644
--- a/src/preproc/tbl/table.cpp
+++ b/src/preproc/tbl/table.cpp
@@ -1639,7 +1639,8 @@ void table::add_entry(int r, int c, const string &str,
}
else if (strncmp(s, "\\R", 2) == 0) {
if (len < 3) {
- error("an ordinary or special character must follow '\\R'");
+ error("an ordinary, special, or indexed character must follow"
+ " '\\R'");
e = new empty_entry(this, f);
}
else {
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit