aboutsummaryrefslogtreecommitdiffstatshomepage
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
commitb7bb50b52763fb6212e5896c4f48f67e7e24944a (patch)
tree583c64d0cb3bdbe36623d41735307a67c32571fc /mdoc_html.c
parent222d77f1d5049da7ae7750ce19f63c21c231c567 (diff)
downloadmandoc-b7bb50b52763fb6212e5896c4f48f67e7e24944a.tar.gz
mandoc-b7bb50b52763fb6212e5896c4f48f67e7e24944a.tar.zst
mandoc-b7bb50b52763fb6212e5896c4f48f67e7e24944a.zip
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.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index 62a319ac..49881ff0 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.252 2017/01/19 13:35:02 schwarze Exp $ */
+/* $Id: mdoc_html.c,v 1.253 2017/01/19 15:27:34 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -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;
}