diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-12-16 22:57:20 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-12-16 22:57:20 +0000 |
commit | 708c84055d92d8f74b0a87f7ff7c9fb4f9a9d50a (patch) | |
tree | a77b91b7b73f3de15487e277fb60c636c35bb049 | |
parent | 266c94623f8d47d4db151c4f7b291320e7613f02 (diff) | |
download | mandoc-708c84055d92d8f74b0a87f7ff7c9fb4f9a9d50a.tar.gz |
Get widths to be propertly represented in -T[x]html.
-rw-r--r-- | mdoc_html.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/mdoc_html.c b/mdoc_html.c index ddc04a59..343d809d 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -903,10 +903,6 @@ mdoc_it_pre(MDOC_ARGS) assert(lists[type]); PAIR_CLASS_INIT(&tag[0], lists[type]); - SCALE_VS_INIT(&su, ! bl->data.Bl->comp); - bufcat_su(h, "margin-top", &su); - PAIR_STYLE_INIT(&tag[1], h); - if (MDOC_HEAD == n->type) { switch (type) { case(LIST_bullet): @@ -928,6 +924,9 @@ mdoc_it_pre(MDOC_ARGS) case(LIST_ohang): /* FALLTHROUGH */ case(LIST_tag): + SCALE_VS_INIT(&su, ! bl->data.Bl->comp); + bufcat_su(h, "margin-top", &su); + PAIR_STYLE_INIT(&tag[1], h); print_otag(h, TAG_DT, 2, tag); break; case(LIST_column): @@ -946,7 +945,9 @@ mdoc_it_pre(MDOC_ARGS) case(LIST_enum): /* FALLTHROUGH */ case(LIST_item): - /* FALLTHROUGH */ + SCALE_VS_INIT(&su, ! bl->data.Bl->comp); + bufcat_su(h, "margin-top", &su); + PAIR_STYLE_INIT(&tag[1], h); print_otag(h, TAG_LI, 2, tag); break; case(LIST_diag): @@ -958,9 +959,19 @@ mdoc_it_pre(MDOC_ARGS) case(LIST_ohang): /* FALLTHROUGH */ case(LIST_tag): - print_otag(h, TAG_DD, 1, tag); + if (NULL == bl->data.Bl->width) { + print_otag(h, TAG_DD, 1, tag); + break; + } + a2width(bl->data.Bl->width, &su); + bufcat_su(h, "margin-left", &su); + PAIR_STYLE_INIT(&tag[1], h); + print_otag(h, TAG_DD, 2, tag); break; case(LIST_column): + SCALE_VS_INIT(&su, ! bl->data.Bl->comp); + bufcat_su(h, "margin-top", &su); + PAIR_STYLE_INIT(&tag[1], h); print_otag(h, TAG_TD, 2, tag); break; default: |