summaryrefslogtreecommitdiffstats
path: root/html.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-10-02 14:56:47 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-10-02 14:56:47 +0000
commit1a292c4956427312d2ebea2becc01a2861e089fc (patch)
treed767b2200fd77455d1c7f9c1ef1ec6648d1750b0 /html.c
parent9e238facdedce54e6eeccb030929d4b3893df873 (diff)
downloadmandoc-1a292c4956427312d2ebea2becc01a2861e089fc.tar.gz
Add an option -T html -O toc to add a brief table of contents near
the top of HTML pages containing at least two non-standard sections. Suggested by Adam Kalisz and discussed with kristaps@ during EuroBSDCon 2018.
Diffstat (limited to 'html.c')
-rw-r--r--html.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/html.c b/html.c
index d0c2b656..8926ca2b 100644
--- a/html.c
+++ b/html.c
@@ -136,6 +136,8 @@ html_alloc(const struct manoutput *outopts)
h->base_includes = outopts->includes;
if (outopts->fragment)
h->oflags |= HTML_FRAGMENT;
+ if (outopts->toc)
+ h->oflags |= HTML_TOC;
mandoc_ohash_init(&id_unique, 4, 0);