summaryrefslogtreecommitdiffstats
path: root/tbl_layout.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-01-11 14:12:01 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-01-11 14:12:01 +0000
commitfa73a21290e351913eadd2b70b4471fd30829483 (patch)
treecb524df5813e538c91ca612c4110c9e4291a7eb9 /tbl_layout.c
parentc68f7a36a22b06ab0bb6afcd32d531d893abbc57 (diff)
downloadmandoc-fa73a21290e351913eadd2b70b4471fd30829483.tar.gz
Add support for "^" vertical spanners. Unlike GNU tbl, raise
error-class messages when data is being ignored by specifying it in "^" cells (either as-is or in blocks). Also note again that horizontal spanners aren't really supported...
Diffstat (limited to 'tbl_layout.c')
-rw-r--r--tbl_layout.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tbl_layout.c b/tbl_layout.c
index 25b77e1c..7063aaff 100644
--- a/tbl_layout.c
+++ b/tbl_layout.c
@@ -220,6 +220,16 @@ cell(struct tbl_node *tbl, struct tbl_row *rp,
}
}
+ /*
+ * If a vertical spanner is found, we may not be in the first
+ * row.
+ */
+
+ if (TBL_CELL_DOWN == c && rp == tbl->first_row) {
+ TBL_MSG(tbl, MANDOCERR_TBLLAYOUT, ln, *pos);
+ return(0);
+ }
+
(*pos)++;
/* Extra check for the double-vertical. */