summaryrefslogtreecommitdiffstats
path: root/mdoc_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
commit7e120ae54929e67f6c54d41ad0789f48600cfb3a (patch)
tree398a113210f60a40f5483368d7eedbb7d6018e75 /mdoc_html.c
parent40d88740ee8b94c6e6a8385a424298b3cc6e7f52 (diff)
downloadmandoc-7e120ae54929e67f6c54d41ad0789f48600cfb3a.tar.gz
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.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index a3916945..d90e6447 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -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