diff options
Diffstat (limited to 'lib/template.source.sh')
| -rw-r--r-- | lib/template.source.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/template.source.sh b/lib/template.source.sh index 626aed0..acbc9e3 100644 --- a/lib/template.source.sh +++ b/lib/template.source.sh @@ -75,7 +75,7 @@ template::_line () { # Sugesting adding a ToC when there are many sections template::suggester::toc () { find "$CONTENT_BASE_DIR/gemtext" -name \*.gmi | while read -r gmi_file; do - if $GREP -q '<< template::inline::toc' "$gmi_file"; then + if test -f "$gmi_file.tpl" && $GREP -q '<< template::inline::toc' "$gmi_file.tpl"; then continue # Has alread a ToC fi local -i num_sections="$($SED -E -n '/^```/,/^```/! { /^#+ /p; }' "$gmi_file" | wc -l)" |
