aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tbl_html.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-11-25 21:17:34 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-11-25 21:17:34 +0000
commitc262512cda526a647bc53812a01794100b385be9 (patch)
tree8a04143cfc733ffea91a3343b24547e43eb83308 /tbl_html.c
parente30a05d61589276c015f65e4ac75df70040c3808 (diff)
downloadmandoc-c262512cda526a647bc53812a01794100b385be9.tar.gz
mandoc-c262512cda526a647bc53812a01794100b385be9.tar.zst
mandoc-c262512cda526a647bc53812a01794100b385be9.zip
Let cells containing nothing but \^ extend the cell above.
Missing feature reported by Pali dot Rohar at gmail dot com.
Diffstat (limited to 'tbl_html.c')
-rw-r--r--tbl_html.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/tbl_html.c b/tbl_html.c
index b6090038..4523036c 100644
--- a/tbl_html.c
+++ b/tbl_html.c
@@ -1,4 +1,4 @@
-/* $Id: tbl_html.c,v 1.26 2018/11/25 19:24:20 schwarze Exp $ */
+/* $Id: tbl_html.c,v 1.27 2018/11/25 21:17:34 schwarze Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -126,13 +126,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. */