From b7bb50b52763fb6212e5896c4f48f67e7e24944a Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Thu, 19 Jan 2017 15:27:34 +0000 Subject: Clean up CSS rules for sections and paragraphs. Start using real macro names for CSS classes. --- man_html.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'man_html.c') 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 * Copyright (c) 2013, 2014, 2015, 2017 Ingo Schwarze @@ -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; } -- cgit v1.2.3-56-ge451