From c9ad34c95dd69ea423622b730e2b4a121f0003ea Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 26 Aug 2024 22:35:57 +0300 Subject: fix --- lib/template.source.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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)" -- cgit v1.2.3