summaryrefslogtreecommitdiffstats
path: root/mdoc_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 /mdoc_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 'mdoc_html.c')
-rw-r--r--mdoc_html.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index d90e6447..74337340 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -313,7 +313,9 @@ html_mdoc(void *arg, const struct roff_man *mdoc)
}
mdoc_root_pre(&mdoc->meta, mdoc->first->child, h);
+ t = print_otag(h, TAG_DIV, "c", "manual-text");
print_mdoc_nodelist(&mdoc->meta, mdoc->first->child, h);
+ print_tagq(h, t);
mdoc_root_post(&mdoc->meta, mdoc->first->child, h);
print_tagq(h, NULL);
}
@@ -519,7 +521,6 @@ mdoc_sh_pre(MDOC_ARGS)
switch (n->type) {
case ROFFT_BLOCK:
- print_otag(h, TAG_DIV, "c", "section");
return 1;
case ROFFT_BODY:
if (n->sec == SEC_AUTHORS)
@@ -530,10 +531,10 @@ mdoc_sh_pre(MDOC_ARGS)
}
if ((id = make_id(n)) != NULL) {
- print_otag(h, TAG_H1, "i", id);
+ print_otag(h, TAG_H1, "ci", "Sh", id);
free(id);
} else
- print_otag(h, TAG_H1, "");
+ print_otag(h, TAG_H1, "c", "Sh");
return 1;
}
@@ -543,17 +544,14 @@ mdoc_ss_pre(MDOC_ARGS)
{
char *id;
- if (n->type == ROFFT_BLOCK) {
- print_otag(h, TAG_DIV, "c", "subsection");
- return 1;
- } else if (n->type == ROFFT_BODY)
+ if (n->type != ROFFT_HEAD)
return 1;
if ((id = make_id(n)) != NULL) {
- print_otag(h, TAG_H2, "i", id);
+ print_otag(h, TAG_H2, "ci", "Ss", id);
free(id);
} else
- print_otag(h, TAG_H2, "");
+ print_otag(h, TAG_H2, "c", "Ss");
return 1;
}