diff options
| author | Paul Buetow <paul@buetow.org> | 2024-08-24 14:20:27 +0100 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2024-08-24 14:20:27 +0100 |
| commit | a0cdf880c32264165f1af87d7f0465d3923ffe88 (patch) | |
| tree | f5b4ccb757c4bd053e694139cb96f28e2bb7d320 /lib/template.source.sh | |
| parent | 28e275da0a1b9db74e1d93cfff80c4af1214dff6 (diff) | |
nicer ToC for HTML
Diffstat (limited to 'lib/template.source.sh')
| -rw-r--r-- | lib/template.source.sh | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/template.source.sh b/lib/template.source.sh index 519f2cf..f6b25a9 100644 --- a/lib/template.source.sh +++ b/lib/template.source.sh @@ -92,20 +92,17 @@ template::inline::index () { # To generate a table of contents template::inline::toc () { - echo '```' - echo 'Table of contents' - echo '=================' + echo '## Table of Contents' echo '' < "$(basename "$CURRENT_TPL")" $SED -E -n ' /^```/,/^```/! { /^#+ / { - s/#/ /g - s/^ // + s/#/* ./ + s/#/./g p } } ' - echo '```' } template::test () { |
