summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Carstairs <jcarstairs@scottlogic.com>2026-09-08 09:47:16 +0100
committerJoe Carstairs <jcarstairs@scottlogic.com>2026-09-08 09:47:16 +0100
commit7dc7ac78e6ba55c4ebf4f201481092ece0970a98 (patch)
treee5381620a135f02e4a56c53242ab08ea95d96436
parent50ea9e34dfb990066927f8981ec0bda209bb24da (diff)
pre-format gemtext syntax if in <pre>
-rwxr-xr-xhttp/bin/gmi2upphtml12
1 files changed, 6 insertions, 6 deletions
diff --git a/http/bin/gmi2upphtml b/http/bin/gmi2upphtml
index 0d16c56..8638d0a 100755
--- a/http/bin/gmi2upphtml
+++ b/http/bin/gmi2upphtml
@@ -103,6 +103,12 @@ pp \"\${SHARE}\"/components/meta.upphtml
while read line
do
+ if [ $is_in_preformatted_block -ne 0 ]
+ then
+ echo "$(escape_upphtml "${line}")"
+ continue
+ fi
+
if [ "$(echo $line | sed "s/[[:space:]]//g")" = "" ]
then
continue
@@ -178,12 +184,6 @@ do
continue
fi
- if [ $is_in_preformatted_block -ne 0 ]
- then
- echo "$(escape_upphtml "${line}")"
- continue
- fi
-
close_all_open_blocks
echo "<p>$(escape_upphtml "${line}")</p>"
done