* mdocml: Get widths to be propertly represented in -T[x]html.
@ 2010-12-16 22:57 kristaps
0 siblings, 0 replies; only message in thread
From: kristaps @ 2010-12-16 22:57 UTC (permalink / raw)
To: source
Log Message:
-----------
Get widths to be propertly represented in -T[x]html.
Modified Files:
--------------
mdocml:
mdoc_html.c
Revision Data
-------------
Index: mdoc_html.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_html.c,v
retrieving revision 1.121
retrieving revision 1.122
diff -Lmdoc_html.c -Lmdoc_html.c -u -p -r1.121 -r1.122
--- mdoc_html.c
+++ 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:
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-12-16 22:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-16 22:57 mdocml: Get widths to be propertly represented in -T[x]html kristaps
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).