aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tbl_html.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2021-05-16 23:18:35 +0000
committerIngo Schwarze <schwarze@openbsd.org>2021-05-16 23:18:35 +0000
commitd6266f53ec7f1dc3346b03dc9d37493645b4f5d4 (patch)
tree73c3916fffb5277c5ce063c785eec9fe41d68ebb /tbl_html.c
parent3b3aaab0352b702195460124cd2c17cfd0ca5dbc (diff)
downloadmandoc-d6266f53ec7f1dc3346b03dc9d37493645b4f5d4.tar.gz
mandoc-d6266f53ec7f1dc3346b03dc9d37493645b4f5d4.tar.zst
mandoc-d6266f53ec7f1dc3346b03dc9d37493645b4f5d4.zip
Implement the layout specification "a" (left justify with 1em indentation)
in HTML output mode; before this patch, the indentation was missing. Terminal output already supported the "a" specifier since 2010. Issue reported and patch tested by Oliver dot Corff at email dot de.
Diffstat (limited to 'tbl_html.c')
-rw-r--r--tbl_html.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tbl_html.c b/tbl_html.c
index 8b80e385..6e500dc5 100644
--- a/tbl_html.c
+++ b/tbl_html.c
@@ -1,4 +1,4 @@
-/* $Id: tbl_html.c,v 1.34 2021/05/16 18:11:20 schwarze Exp $ */
+/* $Id: tbl_html.c,v 1.35 2021/05/16 23:18:35 schwarze Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014,2015,2017,2018,2021 Ingo Schwarze <schwarze@openbsd.org>
@@ -247,6 +247,8 @@ print_tbl(struct html *h, const struct tbl_span *sp)
html_setfont(h, ESCAPE_FONTBOLD);
else if (dp->layout->flags & TBL_CELL_ITALIC)
html_setfont(h, ESCAPE_FONTITALIC);
+ if (dp->layout->pos == TBL_CELL_LONG)
+ print_text(h, "\\[u2003]"); /* em space */
print_text(h, dp->string);
html_setfont(h, save_font);
}