Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
1 files changed, 8 insertions, 1 deletions
-rwxr-xr-xcsg9
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