summaryrefslogtreecommitdiffstats
path: root/man_html.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-01-19 15:27:34 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-01-19 15:27:34 +0000
commit580c890d3b3950c00bf3f40566df511d65a316d6 (patch)
tree570221a66b828c7609ec2bc92ababbfb8df38c41 /man_html.c
parent17fa3ce7264c77c2352e413e73bd23e6f8bc7c47 (diff)
downloadmandoc-580c890d3b3950c00bf3f40566df511d65a316d6.tar.gz
Clean up CSS rules for sections and paragraphs.
Start using real macro names for CSS classes.
Diffstat (limited to 'man_html.c')
-rw-r--r--man_html.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/man_html.c b/man_html.c
index 77650d89..a2c4b1e6 100644
--- a/man_html.c
+++ b/man_html.c
@@ -162,7 +162,11 @@ html_man(void *arg, const struct roff_man *man)
print_otag(h, TAG_BODY, "");
}
- print_man_nodelist(&man->meta, man->first, &mh, h);
+ man_root_pre(&man->meta, man->first, &mh, h);
+ t = print_otag(h, TAG_DIV, "c", "manual-text");
+ print_man_nodelist(&man->meta, man->first->child, &mh, h);
+ print_tagq(h, t);
+ man_root_post(&man->meta, man->first, &mh, h);
print_tagq(h, NULL);
}
@@ -198,9 +202,6 @@ print_man_node(MAN_ARGS)
t = h->tags.head;
switch (n->type) {
- case ROFFT_ROOT:
- man_root_pre(man, n, mh, h);
- break;
case ROFFT_TEXT:
if ('\0' == *n->string) {
print_paragraph(h);
@@ -254,9 +255,6 @@ print_man_node(MAN_ARGS)
print_stagq(h, t);
switch (n->type) {
- case ROFFT_ROOT:
- man_root_post(man, n, mh, h);
- break;
case ROFFT_EQN:
break;
default:
@@ -353,12 +351,11 @@ man_SH_pre(MAN_ARGS)
{
if (n->type == ROFFT_BLOCK) {
mh->fl &= ~MANH_LITERAL;
- print_otag(h, TAG_DIV, "c", "section");
return 1;
} else if (n->type == ROFFT_BODY)
return 1;
- print_otag(h, TAG_H1, "");
+ print_otag(h, TAG_H1, "c", "Sh");
return 1;
}
@@ -432,12 +429,11 @@ man_SS_pre(MAN_ARGS)
{
if (n->type == ROFFT_BLOCK) {
mh->fl &= ~MANH_LITERAL;
- print_otag(h, TAG_DIV, "c", "subsection");
return 1;
} else if (n->type == ROFFT_BODY)
return 1;
- print_otag(h, TAG_H2, "");
+ print_otag(h, TAG_H2, "c", "Ss");
return 1;
}
@@ -510,7 +506,7 @@ man_HP_pre(MAN_ARGS)
sui.scale = -sum.scale;
print_bvspace(h, n);
- print_otag(h, TAG_DIV, "csului", "spacer", &sum, &sui);
+ print_otag(h, TAG_DIV, "csului", "Pp", &sum, &sui);
return 1;
}