From: Paul Hänsch Date: Tue, 17 May 2022 23:12:46 +0000 (+0200) Subject: clearing of meta data lines now obsolete X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=50bd6b93e745fabe553a440c27291c1f25c3389d;p=shellwiki clearing of meta data lines now obsolete --- diff --git a/handlers/10_page.sh b/handlers/10_page.sh index 334df19..004dd03 100755 --- a/handlers/10_page.sh +++ b/handlers/10_page.sh @@ -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}.$$" \ diff --git a/macros/include b/macros/include index 97f35a4..b1d1e77 100755 --- a/macros/include +++ b/macros/include @@ -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 '
' "$(HTML "$glob")" - ( cd "${mdfile%/*}" + ( cd -- "${mdfile%/*}" sed -n "${from},${to}p" <"$mdfile" \ - | sed -E '1,20{ /^%[a-z]+/d; }' \ | md \ | grep -vx '' ) | sed -E '