summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/mdoc_html.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2017-01-19 15:27:26 +0000
committerschwarze <schwarze@openbsd.org>2017-01-19 15:27:26 +0000
commitc7402a19d0801e05f4312cdb6ee12130ce32eb85 (patch)
treec180ae633b7595b20cb8ad84256e2826e7592f05 /usr.bin/mandoc/mdoc_html.c
parentExtend struct platform with MP control functions, and add bootstrap code (diff)
downloadwireguard-openbsd-c7402a19d0801e05f4312cdb6ee12130ce32eb85.tar.xz
wireguard-openbsd-c7402a19d0801e05f4312cdb6ee12130ce32eb85.zip
Clean up CSS rules for sections and paragraphs.
Start using real macro names for CSS classes.
Diffstat (limited to 'usr.bin/mandoc/mdoc_html.c')
-rw-r--r--usr.bin/mandoc/mdoc_html.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/usr.bin/mandoc/mdoc_html.c b/usr.bin/mandoc/mdoc_html.c
index a41ce23cbb8..bec67201266 100644
--- a/usr.bin/mandoc/mdoc_html.c
+++ b/usr.bin/mandoc/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mdoc_html.c,v 1.127 2017/01/19 13:34:59 schwarze Exp $ */
+/* $OpenBSD: mdoc_html.c,v 1.128 2017/01/19 15:27:26 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -311,7 +311,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);
}
@@ -517,7 +519,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)
@@ -528,10 +529,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;
}
@@ -541,17 +542,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;
}