aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man_html.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-01-19 13:35:02 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-01-19 13:35:02 +0000
commit3d438a3600536da5375d7629896667530c476aaf (patch)
treeb404ea9b3f4869e0e195cabb2dc554b9d42ee3ba /man_html.c
parente73d0cb63df953bf695636bd8906deb316a6d718 (diff)
downloadmandoc-3d438a3600536da5375d7629896667530c476aaf.tar.gz
mandoc-3d438a3600536da5375d7629896667530c476aaf.tar.zst
mandoc-3d438a3600536da5375d7629896667530c476aaf.zip
Start cleanup: trim useless HTML comments, <div> elements,
and CSS rules on the <html> and <body> levels.
Diffstat (limited to 'man_html.c')
-rw-r--r--man_html.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/man_html.c b/man_html.c
index cf973ce0..1ee661aa 100644
--- a/man_html.c
+++ b/man_html.c
@@ -1,4 +1,4 @@
-/* $Id: man_html.c,v 1.125 2017/01/19 01:00:14 schwarze Exp $ */
+/* $Id: man_html.c,v 1.126 2017/01/19 13:35:02 schwarze Exp $ */
/*
* Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2013, 2014, 2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -148,24 +148,22 @@ html_man(void *arg, const struct roff_man *man)
{
struct mhtml mh;
struct html *h;
- struct tag *t, *tt;
+ struct tag *t;
memset(&mh, 0, sizeof(mh));
h = (struct html *)arg;
- if ( ! (HTML_FRAGMENT & h->oflags)) {
+ if ((h->oflags & HTML_FRAGMENT) == 0) {
print_gen_decls(h);
- t = print_otag(h, TAG_HTML, "");
- tt = print_otag(h, TAG_HEAD, "");
+ print_otag(h, TAG_HTML, "");
+ t = print_otag(h, TAG_HEAD, "");
print_man_head(&man->meta, man->first, &mh, h);
- print_tagq(h, tt);
+ print_tagq(h, t);
print_otag(h, TAG_BODY, "");
- print_otag(h, TAG_DIV, "c", "mandoc");
- } else
- t = print_otag(h, TAG_DIV, "c", "mandoc");
+ }
print_man_nodelist(&man->meta, man->first, &mh, h);
- print_tagq(h, t);
+ print_tagq(h, NULL);
}
static void