Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit853702c4ef47563cac31b129e99bf35e0cc84405 (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-10-17 14:09:37 +0300
Committer
 Syndamia <kamen@syndamia.com>
2023-10-17 14:09:37 +0300
Files674038c0e00c5dd12dd70e684d1117f410fbfd83
csg-853702c4ef47563cac31b129e99bf35e0cc84405.tar
csg-853702c4ef47563cac31b129e99bf35e0cc84405.tar.gz
csg-853702c4ef47563cac31b129e99bf35e0cc84405.zip
Parent65e74b7f0bc0cc758350972a4bd558846cd50151 (diff)
[s2] Restructured and added comments for title variable
1 files changed, 5 insertions, 5 deletions
-rwxr-xr-xcsg10
diff --git a/csg b/csg
index 3aacb04..fd71b22 100755
--- a/csg
+++ b/csg
@@ -189,13 +189,13 @@ transform-file() {
local outf="${file%md}html"
local scripts="$2"
- # Markdown stats for a file: title, description, words, date created, date edited
+ # Gets special information from the file
local title="$($CSG_AWK -v titlef="$TITLEF" '
/^# / {
- $1 = ""
- sub(FS, "")
- sub(/.*/, titlef)
- print
+ # Remove first field
+ $1 = ""; sub(FS, "")
+ # Output title
+ sub(/.*/, titlef); print
exit
}' "$file")"
local descr="$($CSG_AWK '