From 1b9f025da80bb30db913635a60e799a3e523f2e1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Wed, 28 Jul 2021 22:31:07 +0200 Subject: [PATCH] move markdown wrapper to widgets --- index.cgi | 7 ------- widgets.sh | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/index.cgi b/index.cgi index 8bc1ad0..1bfc2b7 100755 --- a/index.cgi +++ b/index.cgi @@ -11,13 +11,6 @@ _BASE="${_BASE%/}" #. "$_EXEC"/session_lock.sh . "$_EXEC"/widgets.sh -export MD_HTML="false" -if [ "$(which awk)" ]; then - markdown() { awk -f "$_EXEC/cgilite/markdown.awk"; } -else - markdown() { busybox awk -f "$_EXEC/cgilite/markdown.awk"; } -fi - PATH_INFO="$(PATH "/${PATH_INFO#${_BASE}}")" #git init "$_DATA" >/dev/null & diff --git a/widgets.sh b/widgets.sh index ab88b3e..3eb4850 100755 --- a/widgets.sh +++ b/widgets.sh @@ -1,5 +1,12 @@ #!/bin/sh +export MD_HTML="false" +if [ "$(which awk)" ]; then + markdown() { awk -f "$_EXEC/cgilite/markdown.awk"; } +else + markdown() { busybox awk -f "$_EXEC/cgilite/markdown.awk"; } +fi + checked(){ local check="$1"; shift 1; for comp in "$@"; do -- 2.39.2