From 50bd6b93e745fabe553a440c27291c1f25c3389d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Wed, 18 May 2022 01:12:46 +0200 Subject: [PATCH] clearing of meta data lines now obsolete --- handlers/10_page.sh | 4 ++-- macros/include | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 ' -- 2.39.2