diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2022-01-12 04:43:26 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2022-01-12 04:43:26 +0000 |
commit | 503f8abef009e5369607efeb82522c89b976581f (patch) | |
tree | 9b4443ddc61564014ecaeb74444af0b4f0c507ea | |
parent | e1a01aa9b20122cb40cafd18bb9e1047e1617e61 (diff) | |
download | mandoc-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.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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; |