From 3d53bc0f504bfa821a250cb8c824f1a71d3fa18b Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Fri, 7 Jan 2011 14:59:52 +0000 Subject: 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. --- tbl_layout.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'tbl_layout.c') 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 * @@ -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])) { -- cgit v1.2.3