aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2022-01-12 04:43:26 +0000
committerIngo Schwarze <schwarze@openbsd.org>2022-01-12 04:43:26 +0000
commit503f8abef009e5369607efeb82522c89b976581f (patch)
tree9b4443ddc61564014ecaeb74444af0b4f0c507ea
parente1a01aa9b20122cb40cafd18bb9e1047e1617e61 (diff)
downloadmandoc-503f8abef009e5369607efeb82522c89b976581f.tar.gz
mandoc-503f8abef009e5369607efeb82522c89b976581f.tar.zst
mandoc-503f8abef009e5369607efeb82522c89b976581f.zip
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 <hr/>, 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 <tbullock at comlore dot com>.
-rw-r--r--tbl_html.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tbl_html.c b/tbl_html.c
index 65c8ae8f..908bb4c8 100644
--- a/tbl_html.c
+++ b/tbl_html.c
@@ -1,4 +1,4 @@
-/* $Id: tbl_html.c,v 1.38 2021/09/09 16:52:52 schwarze Exp $ */
+/* $Id: tbl_html.c,v 1.39 2022/01/12 04:43:26 schwarze Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014,2015,2017,2018,2021 Ingo Schwarze <schwarze@openbsd.org>
@@ -247,7 +247,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;