From 66c6f8c28a9a7edc0ce9930d04bed345cf4dfbb7 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Tue, 17 Oct 2023 13:32:38 +0300 Subject: (s2) Fixed title var not using title format --- csg | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/csg b/csg index fe3a677..d6d1d40 100755 --- a/csg +++ b/csg @@ -181,7 +181,14 @@ transform-file() { local scripts="$2" # Markdown stats for a file: title, description, words, date created, date edited - local title="$($CSG_AWK '/^# / {print substr($0, 2); exit}' "$file")" + local title="$($CSG_AWK -v titlef="$TITLEF" ' + /^# / { + $1 = "" + sub(FS, "") + sub(/.*/, titlef) + print + exit + }' "$file")" local descr="$($CSG_AWK ' /^[[:alpha:]]/ { startedGathering = 1 -- cgit v1.3.1-23-gd82d