aboutsummaryrefslogtreecommitdiffstatshomepage
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
commitb7bb50b52763fb6212e5896c4f48f67e7e24944a (patch)
tree583c64d0cb3bdbe36623d41735307a67c32571fc /man_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 'man_html.c')
-rw-r--r--man_html.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/man_html.c b/man_html.c
index 1ee661aa..14b3d42a 100644
--- a/man_html.c
+++ b/man_html.c
@@ -1,4 +1,4 @@
-/* $Id: man_html.c,v 1.126 2017/01/19 13:35:02 schwarze Exp $ */
+/* $Id: man_html.c,v 1.127 2017/01/19 15:27:34 schwarze Exp $ */
/*
* Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2013, 2014, 2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -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;
}