diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2021-09-10 12:07:21 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2021-09-10 12:07:21 +0000 |
commit | 0f0b8f0b360106396aea586cbe1e932cebaa15f1 (patch) | |
tree | 839a24c6ca145ee1be12a3e0a2ec8c558a8fced6 | |
parent | 9c3d174e4a3afaf42374512b60ecaa54c98b3415 (diff) | |
download | mandoc-0f0b8f0b360106396aea586cbe1e932cebaa15f1.tar.gz |
In a tbl(7) having the "nospaces" option, skip space characters
not only at the end of data cells, but also after "T}",
aligning the behaviour of the parser with GNU tbl(1).
Issue reported by <Oliver dot Corff at email dot de>.
-rw-r--r-- | tbl_data.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -200,6 +200,9 @@ tbl_cdata(struct tbl_node *tbl, int ln, const char *p, int pos) if (p[pos] == 'T' && p[pos + 1] == '}') { pos += 2; + if (tbl->opts.opts & TBL_OPT_NOSPACE) + while (p[pos] == ' ') + pos++; if (p[pos] == tbl->opts.tab) { tbl->part = TBL_PART_DATA; pos++; |