diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2019-01-10 07:40:10 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2019-01-10 07:40:10 +0000 |
commit | a4e1608773e41b082d75ff2cbf2d56d12f5f02a1 (patch) | |
tree | 057ca6e02d1548f9907280bbcce3ed7231d90eba /mdoc_html.c | |
parent | 6719c1661f033ee6a197313c077e571a96ce1359 (diff) | |
download | mandoc-a4e1608773e41b082d75ff2cbf2d56d12f5f02a1.tar.gz mandoc-a4e1608773e41b082d75ff2cbf2d56d12f5f02a1.tar.zst mandoc-a4e1608773e41b082d75ff2cbf2d56d12f5f02a1.zip |
After years of gnashing of teeth, i finally found a way to avoid
having to write empty list elements for non-compact .Bl -tag lists:
1. Add margin-bottom to the <dd>.
Note that margin-top on the <dt> doesn't work because it would put
a short <dt> lower than the <dd>; margin-bottom on the <dt> doesn't
work because it would put vertical space before the <dd> for a long
<dt>; and margin-top on the <dd> doesn't work because it would put
a short <dt> higher than the <dd>. Only margin-bottom on the <dd>
has none of these adverse effects.
2. Of course, margin-bottom on the <dd> fails to take care of the
vertical spacing before the first list element, so implement that
separately by margin-top on the <dl>.
3. For .Bl -tag -compact, reset both to zero.
Diffstat (limited to 'mdoc_html.c')
-rw-r--r-- | mdoc_html.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/mdoc_html.c b/mdoc_html.c index 2978f0c8..08a2dc82 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.323 2019/01/07 07:26:29 schwarze Exp $ */ +/* $Id: mdoc_html.c,v 1.324 2019/01/10 07:40:10 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014,2015,2016,2017,2018 Ingo Schwarze <schwarze@openbsd.org> @@ -741,7 +741,6 @@ static int mdoc_it_pre(MDOC_ARGS) { const struct roff_node *bl; - struct tag *t; enum mdoc_list type; bl = n->parent; @@ -783,17 +782,6 @@ mdoc_it_pre(MDOC_ARGS) case LIST_tag: switch (n->type) { case ROFFT_HEAD: - if (h->style != NULL && !bl->norm->Bl.comp && - (n->parent->prev == NULL || - n->parent->prev->body == NULL || - n->parent->prev->body->child != NULL)) { - t = print_otag(h, TAG_DT, ""); - print_text(h, "\\ "); - print_tagq(h, t); - t = print_otag(h, TAG_DD, ""); - print_text(h, "\\ "); - print_tagq(h, t); - } print_otag(h, TAG_DT, ""); break; case ROFFT_BODY: |