diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2018-10-02 14:56:47 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2018-10-02 14:56:47 +0000 |
commit | 1a292c4956427312d2ebea2becc01a2861e089fc (patch) | |
tree | d767b2200fd77455d1c7f9c1ef1ec6648d1750b0 /manpath.c | |
parent | 9e238facdedce54e6eeccb030929d4b3893df873 (diff) | |
download | mandoc-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 'manpath.c')
-rw-r--r-- | manpath.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1,6 +1,6 @@ /* $Id$ */ /* - * Copyright (c) 2011, 2014, 2015, 2017 Ingo Schwarze <schwarze@openbsd.org> + * Copyright (c) 2011,2014,2015,2017,2018 Ingo Schwarze <schwarze@openbsd.org> * Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv> * * Permission to use, copy, modify, and distribute this software for any @@ -233,7 +233,7 @@ manconf_output(struct manoutput *conf, const char *cp, int fromfile) { const char *const toks[] = { "includes", "man", "paper", "style", - "indent", "width", "fragment", "mdoc", "noval" + "indent", "width", "fragment", "mdoc", "noval", "toc" }; const char *errstr; @@ -320,6 +320,9 @@ manconf_output(struct manoutput *conf, const char *cp, int fromfile) case 8: conf->noval = 1; return 0; + case 9: + conf->toc = 1; + return 0; default: if (fromfile) warnx("-O %s: Bad argument", cp); |