From: schwarze Date: Wed, 12 Jan 2022 04:43:21 +0000 (+0000) Subject: According to the tbl(7) manual, if a data cell contains only the X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=fa3f0bd5dc7a8c8443d228fa08cd91c9d2d2d64a;p=openbsd According to the tbl(7) manual, if a data cell contains only the two character sequence "\_" or "\=", a single or double horizontal line is supposed to be drawn inside the cell, not joining its neighbours. I am not aware of any way to do that with HTML and/or CSS. Still, it seems closer to the intent of the document author to draw a horizontal line with
, even though that line will join the neighbour cells, rather than printing a literal '_' or '=' character. Formatting tweak inspired by a related question from Ted Bullock . --- diff --git a/usr.bin/mandoc/tbl_html.c b/usr.bin/mandoc/tbl_html.c index 77b6a8cb1e4..f2a3c2d51c9 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.33 2021/09/09 16:50:57 schwarze Exp $ */ +/* $OpenBSD: tbl_html.c,v 1.34 2022/01/12 04:43:21 schwarze Exp $ */ /* * Copyright (c) 2011 Kristaps Dzonsons * Copyright (c) 2014,2015,2017,2018,2021 Ingo Schwarze @@ -245,7 +245,9 @@ print_tbl(struct html *h, const struct tbl_span *sp) if (dp->layout->pos == TBL_CELL_HORIZ || dp->layout->pos == TBL_CELL_DHORIZ || dp->pos == TBL_DATA_HORIZ || - dp->pos == TBL_DATA_DHORIZ) + dp->pos == TBL_DATA_NHORIZ || + dp->pos == TBL_DATA_DHORIZ || + dp->pos == TBL_DATA_NDHORIZ) print_otag(h, TAG_HR, ""); else if (dp->string != NULL) { save_font = h->metac;