diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-05-17 13:11:40 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-05-17 13:11:40 +0000 |
commit | 7585ce47e0934f9b0eabd76bf7000d02950e6e1c (patch) | |
tree | 333705b8a5328e1237cf10f3c071082b1c58487d /tbl_layout.c | |
parent | fda9f340a64e92c35b9b074f82c1eeb4fa1b68cc (diff) | |
download | mandoc-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.c | 17 |
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 |