diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2018-11-25 21:17:31 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2018-11-25 21:17:31 +0000 |
commit | f21cad651005d421034f5bae43b7570be85bd7da (patch) | |
tree | 873f1aaa817ad4b95db4e1eebde296e61f8a6f9a /usr.bin/mandoc/tbl_html.c | |
parent | d830412f59d4c069c8fc20e462e7821d9f9e58c2 (diff) |
Let cells containing nothing but \^ extend the cell above.
Missing feature reported by Pali dot Rohar at gmail dot com.
Diffstat (limited to 'usr.bin/mandoc/tbl_html.c')
-rw-r--r-- | usr.bin/mandoc/tbl_html.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/usr.bin/mandoc/tbl_html.c b/usr.bin/mandoc/tbl_html.c index e5de1a54912..03c55004d1f 100644 --- a/usr.bin/mandoc/tbl_html.c +++ b/usr.bin/mandoc/tbl_html.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tbl_html.c,v 1.21 2018/11/25 19:23:59 schwarze Exp $ */ +/* $OpenBSD: tbl_html.c,v 1.22 2018/11/25 21:17:30 schwarze Exp $ */ /* * Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014, 2015, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org> @@ -124,13 +124,18 @@ print_tbl(struct html *h, const struct tbl_span *sp) default: for (dp = sp->first; dp != NULL; dp = dp->next) { print_stagq(h, tt); - switch (dp->layout->pos) { - case TBL_CELL_SPAN: - case TBL_CELL_DOWN: + + /* + * Do not generate <td> elements for continuations + * of spanned cells. Larger <td> elements covering + * this space were already generated earlier. + */ + + if (dp->layout->pos == TBL_CELL_SPAN || + dp->layout->pos == TBL_CELL_DOWN || + (dp->string != NULL && + strcmp(dp->string, "\\^") == 0)) continue; - default: - break; - } /* Determine the attribute values. */ |