]> git.plutz.net Git - webpoll/commitdiff
move markdown wrapper to widgets
authorPaul Hänsch <paul@plutz.net>
Wed, 28 Jul 2021 20:31:07 +0000 (22:31 +0200)
committerPaul Hänsch <paul@plutz.net>
Wed, 28 Jul 2021 20:31:07 +0000 (22:31 +0200)
index.cgi
widgets.sh

index 8bc1ad0d6777622ef57c59b94eded29fc35dbc11..1bfc2b7e3231b27c2af4cbeb1653daa5322aba6d 100755 (executable)
--- 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 &
index ab88b3ec699319238b3db7452839d15fc8b2139b..3eb4850b274d764b28078f1e5eb0d7148bdf2ebe 100755 (executable)
@@ -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