=================================================================== RCS file: /cvs/mandoc/tbl_html.c,v retrieving revision 1.26 retrieving revision 1.28 diff -u -p -r1.26 -r1.28 --- mandoc/tbl_html.c 2018/11/25 19:24:20 1.26 +++ mandoc/tbl_html.c 2018/11/26 01:51:46 1.28 @@ -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.28 2018/11/26 01:51:46 schwarze Exp $ */ /* * Copyright (c) 2011 Kristaps Dzonsons * Copyright (c) 2014, 2015, 2017, 2018 Ingo Schwarze @@ -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 elements for continuations + * of spanned cells. Larger 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. */ @@ -170,22 +175,10 @@ print_tbl(struct html *h, const struct tbl_span *sp) /* Print the element and the attributes. */ - if (halign == NULL && valign == NULL) - print_otag(h, TAG_TD, "??", - "colspan", hspans, "rowspan", vspans); - else if (halign == NULL) - print_otag(h, TAG_TD, "??s", - "colspan", hspans, "rowspan", vspans, - "vertical-align", valign); - else if (valign == NULL) - print_otag(h, TAG_TD, "??s", - "colspan", hspans, "rowspan", vspans, - "text-align", halign); - else - print_otag(h, TAG_TD, "??ss", - "colspan", hspans, "rowspan", vspans, - "vertical-align", valign, - "text-align", halign); + print_otag(h, TAG_TD, "??ss", + "colspan", hspans, "rowspan", vspans, + "vertical-align", valign, + "text-align", halign); if (dp->string != NULL) print_text(h, dp->string); }