summaryrefslogtreecommitdiffstats
path: root/tbl_html.c
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
commit6ec9b866eb3b74c2727d6489f86daef31ea96df6 (patch)
tree604d18ec175ec4436dfa28a303ac42dc0b2fb246 /tbl_html.c
parent3afe3a7189ba0011bdca45de6f2621f6933c8ba6 (diff)
downloadmandoc-6ec9b866eb3b74c2727d6489f86daef31ea96df6.tar.gz
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>.
Diffstat (limited to 'tbl_html.c')
-rw-r--r--tbl_html.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tbl_html.c b/tbl_html.c
index 27e8dc0e..007cdcc1 100644
--- a/tbl_html.c
+++ b/tbl_html.c
@@ -1,4 +1,4 @@
-/* $Id$ */
+/* $Id$ */
/*
* 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;