Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
1 files changed, 31 insertions, 6 deletions
-rw-r--r--generate-hooks/create-file-lists.awk37
diff --git a/generate-hooks/create-file-lists.awk b/generate-hooks/create-file-lists.awk
index 4a0f2f6..086d9dd 100644
--- a/generate-hooks/create-file-lists.awk
+++ b/generate-hooks/create-file-lists.awk
@@ -46,12 +46,37 @@
# &&nod no folder end (end file list, without having made a folder)
# &&fod folder end
+BEGIN {
+ nam[1] = "nos"
+ rep[1] = "<table class=\"file-list\"><tr>"
+ nam[2] = "fos"
+ rep[2] = "<details class=\"file-wrapper\"><summary>"
+ nam[3] = "fs0"
+ rep[3] = "</summary><table class=\"file-list\"><tr>"
+ nam[4] = "fs"
+ rep[4] = "</tr><tr>"
+ nam[5] = "nod"
+ rep[5] = "</tr></table>"
+ nam[6] = "fod"
+ rep[6] = "</tr></table></details>"
+
+ for (i = 1; i <= length(nam); i++) {
+ pat[i] = "&#38;&#38;" nam[i]
+ }
+}
+
+function substitute(ind) {
+ gsub(/(<p>|<\/p>)/, "")
+ gsub(pat[ind], rep[ind])
+}
+
+/^[ \t]*(<p>|)&#38;&#38;/ {
+ for (i = 1; i <= length(nam); i++) {
+ if (index($0, nam[i]) != 0)
+ substitute(i)
+ }
+}
+
{
- gsub(/&#38;&#38;nos/, "<table class=\"file-list\"><tr>")
- gsub(/^<p>&#38;&#38;fos$/, "<details class=\"file-wrapper\"><summary>")
- gsub(/^&#38;&#38;fs0$/, "</summary><table class=\"file-list\"><tr>")
- gsub(/^&#38;&#38;fs$/, "</tr><tr>")
- gsub(/^&#38;&#38;nod<\/p>$/, "</tr></table>")
- gsub(/^&#38;&#38;fod<\/p>$/, "</tr></table></details>")
print
}