Update of bug #61417 (project groff):
Status: None => In Progress
Assigned to: None => gbranden
_______________________________________________________
Follow-up Comment #1:
Proposed patch.
This was plainly an oversight in the original implementation; dealing with an
invalid vertical span while reading a table format specification is a
different beast than dealing with it while reading table data--you have to do
_something_ with the place where the entry should go. Happily, I don't even
have to give up on the table.
diff --git a/src/preproc/tbl/table.cpp b/src/preproc/tbl/table.cpp
index 11950f1de..06774b899 100644
--- a/src/preproc/tbl/table.cpp
+++ b/src/preproc/tbl/table.cpp
@@ -1534,7 +1534,12 @@ void table::add_entry(int r, int c, const string &str,
e = new double_line_entry(this, f);
}
else if (str == "\\^") {
- do_vspan(r, c);
+ if (r == 0) {
+ error("first row cannot contain a vertical span entry '\\^'");
+ e = new empty_entry(this, f);
+ }
+ else
+ do_vspan(r, c);
}
else if (str.length() > 2 && str[0] == '\\' && str[1] == 'R') {
if (str.search('\n') >= 0)
GNU tbl soldiers on nicely now.
$ cat EXPERIMENTS/table-span-down.ms
.LP
.TS
l l l.
foo \^ bar
baz \^ qux
.TE
$ tgu -t -ms EXPERIMENTS/table-span-down.ms | cat -s
tbl:EXPERIMENTS/table-span-down.ms:4: error: first row cannot contain a
vertical span entry '\^'
foo bar
baz qux
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?61417>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/