summaryrefslogtreecommitdiffstats
path: root/tbl_layout.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-05-17 13:11:40 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-05-17 13:11:40 +0000
commit7585ce47e0934f9b0eabd76bf7000d02950e6e1c (patch)
tree333705b8a5328e1237cf10f3c071082b1c58487d /tbl_layout.c
parentfda9f340a64e92c35b9b074f82c1eeb4fa1b68cc (diff)
downloadmandoc-7585ce47e0934f9b0eabd76bf7000d02950e6e1c.tar.gz
In tbl layouts, we puked if a space didn't followed a vertical bar
(found by Yuri Pankov). This was due to looking for modifiers for the vertical bar. This has been fixed, along with other special-key layout types.
Diffstat (limited to 'tbl_layout.c')
-rw-r--r--tbl_layout.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/tbl_layout.c b/tbl_layout.c
index 8dd35484..b6f45f43 100644
--- a/tbl_layout.c
+++ b/tbl_layout.c
@@ -72,6 +72,23 @@ mods(struct tbl_node *tbl, struct tbl_cell *cp,
char buf[5];
int i;
+ /* Not all types accept modifiers. */
+
+ switch (cp->pos) {
+ case (TBL_CELL_DOWN):
+ /* FALLTHROUGH */
+ case (TBL_CELL_HORIZ):
+ /* FALLTHROUGH */
+ case (TBL_CELL_DHORIZ):
+ /* FALLTHROUGH */
+ case (TBL_CELL_VERT):
+ /* FALLTHROUGH */
+ case (TBL_CELL_DVERT):
+ return(1);
+ default:
+ break;
+ }
+
mod:
/*
* XXX: since, at least for now, modifiers are non-conflicting