Skip to content

Commit aa67d10

Browse files
committed
feat(cli): add new '--toc' option
This flag creates a new h3 at the top of the html file and below it generates list items with links as heading numbers and text for the heading
1 parent 8ce43e4 commit aa67d10

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

cli/cli.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ var OPTIONS []Flag = []Flag{
2222
{
2323
"silent",
2424
false,
25-
"disables info logs, reduces output significantly ",
25+
"disables info logs, reduces output significantly",
26+
},
27+
{
28+
"toc",
29+
false,
30+
"generates a table of contents at the top of the output with links to the headings",
2631
},
2732
{
2833
"keep-temp",

doc/Usage.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,6 @@ exit status 1
3939
| `--keep-temp` | stops fleck from removing temporary files | false |
4040
| `--preprocessor-enabled` | enables the preprocessor and therefore macro expansion | false |
4141
| `--shell-macro-enabled` | enables the `@shell` macro | false |
42+
| `--toc` | generates a table of contents | false |
4243

4344
See [Macros](./Macros.md) for more information about the preprocessor and macros.

0 commit comments

Comments
 (0)