diff options
1 files changed, 8 insertions, 1 deletions
| -rwxr-xr-x | csg | 9 |
@@ -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 |
