diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-01-07 14:59:52 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-01-07 14:59:52 +0000 |
commit | 3d53bc0f504bfa821a250cb8c824f1a71d3fa18b (patch) | |
tree | 93d8918633cf5b3607ab4d7e2acaebbe38ada6ac /tbl_layout.c | |
parent | d5e33853a27c639beda0a85062ce7db9996e22e1 (diff) | |
download | mandoc-3d53bc0f504bfa821a250cb8c824f1a71d3fa18b.tar.gz mandoc-3d53bc0f504bfa821a250cb8c824f1a71d3fa18b.tar.zst mandoc-3d53bc0f504bfa821a250cb8c824f1a71d3fa18b.zip |
Fixes: T} can be followed by a delimiter then more data. Make this
work and add documentation for it.
Also make tbl_term() not puke if the number of data cells is less than
the number of layout cells (which happens from time to time). This
still needs work because we should pad out empty cells so that the
borders all work out.
Diffstat (limited to 'tbl_layout.c')
-rw-r--r-- | tbl_layout.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tbl_layout.c b/tbl_layout.c index c5686c04..fc03086b 100644 --- a/tbl_layout.c +++ b/tbl_layout.c @@ -1,4 +1,4 @@ -/* $Id: tbl_layout.c,v 1.11 2011/01/07 13:03:48 kristaps Exp $ */ +/* $Id: tbl_layout.c,v 1.12 2011/01/07 14:59:52 kristaps Exp $ */ /* * Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -90,6 +90,20 @@ mod: break; } + /* Throw away parenthesised expression. */ + + if ('(' == p[*pos]) { + (*pos)++; + while (p[*pos] && ')' != p[*pos]) + (*pos)++; + if (')' == p[*pos]) { + (*pos)++; + goto mod; + } + TBL_MSG(tbl, MANDOCERR_TBLLAYOUT, ln, *pos); + return(0); + } + /* Parse numerical spacing from modifier string. */ if (isdigit((unsigned char)p[*pos])) { |