]> git.plutz.net Git - shellwiki/commitdiff
clearing of meta data lines now obsolete
authorPaul Hänsch <paul@plutz.net>
Tue, 17 May 2022 23:12:46 +0000 (01:12 +0200)
committerPaul Hänsch <paul@plutz.net>
Tue, 17 May 2022 23:12:46 +0000 (01:12 +0200)
handlers/10_page.sh
macros/include

index 334df197d9694f72dfd8ccdfbc7c4fba69a96feb..004dd03ced270f3b524b2b0b33b9ed07c75c7791 100755 (executable)
@@ -26,8 +26,8 @@ wiki() {
     mkdir -p -- "$_DATA/pages/$page/"
     # Macros expect to find page directory as working dir
     ( cd -- "$_DATA/pages/$page/";
-      sed -E '1,20{ /^%[a-z]+/d; }' "$mdfile" \
-      | md |tee -- "${cache}.$$"
+      md <"$mdfile" \
+      | tee -- "${cache}.$$"
     )
     grep -q '^%nocache' "$mdfile" \
     && rm -- "${cache}.$$" \
index 97f35a4a2d27c84bdd171a7e089365e980971877..b1d1e776765263d0da4086cfed16d2e801520e1b 100755 (executable)
@@ -1,6 +1,7 @@
 #!/bin/sh
 
 . "$_EXEC/cgilite/cgilite.sh"
+. "$_EXEC/cgilite/users.sh"
 . "$_EXEC/acl.sh"
 . "$_EXEC/tools.sh"
 
@@ -51,9 +52,8 @@ page_glob "$page" \
     continue
   fi
   printf '<div class="macro include" page="%s">' "$(HTML "$glob")"
-  ( cd "${mdfile%/*}"
+  ( cd -- "${mdfile%/*}"
     sed -n "${from},${to}p" <"$mdfile" \
-    | sed -E '1,20{ /^%[a-z]+/d; }' \
     | md \
     | grep -vx ''
   ) | sed -E '