diff options
author | 2017-01-19 13:35:02 +0000 | |
---|---|---|
committer | 2017-01-19 13:35:02 +0000 | |
commit | 3d438a3600536da5375d7629896667530c476aaf (patch) | |
tree | b404ea9b3f4869e0e195cabb2dc554b9d42ee3ba /mdoc_html.c | |
parent | e73d0cb63df953bf695636bd8906deb316a6d718 (diff) | |
download | mandoc-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 'mdoc_html.c')
-rw-r--r-- | mdoc_html.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/mdoc_html.c b/mdoc_html.c index c62c8e9e..62a319ac 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.251 2017/01/19 01:00:14 schwarze Exp $ */ +/* $Id: mdoc_html.c,v 1.252 2017/01/19 13:35:02 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@openbsd.org> @@ -299,25 +299,23 @@ void html_mdoc(void *arg, const struct roff_man *mdoc) { struct html *h; - struct tag *t, *tt; + struct tag *t; 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_mdoc_head(&mdoc->meta, mdoc->first->child, 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"); + } mdoc_root_pre(&mdoc->meta, mdoc->first->child, h); print_mdoc_nodelist(&mdoc->meta, mdoc->first->child, h); mdoc_root_post(&mdoc->meta, mdoc->first->child, h); - print_tagq(h, t); + print_tagq(h, NULL); } static void |