summaryrefslogtreecommitdiff
path: root/buetow.org.sh
diff options
context:
space:
mode:
authorPaul Buetow <git@mx.buetow.org>2021-05-01 19:12:40 +0100
committerPaul Buetow <git@mx.buetow.org>2021-05-01 19:12:40 +0100
commitbdc30c8f94e1384206c7f1141918622d501af26f (patch)
tree655a6a55cb1c12ea452910f8af7ab85169b46442 /buetow.org.sh
parent4534d9eb3bdb2191955f5751da5628d2a1645af2 (diff)
fix < and > in pre
Diffstat (limited to 'buetow.org.sh')
-rwxr-xr-xbuetow.org.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/buetow.org.sh b/buetow.org.sh
index 4874609d..b0cfe58f 100755
--- a/buetow.org.sh
+++ b/buetow.org.sh
@@ -193,7 +193,7 @@ html::gemini2html () {
if [[ "$line" == '```'* ]]; then
local -i plain_end=$(( line_nr - 1 ))
# Use sed, as escaping \ in bash strings is hell!
- sed -n ${plain_start},${plain_end}p $gmi_file
+ sed -n "${plain_start},${plain_end} { s|<|&lt;|g; s|>|&gt;|g; p; }" $gmi_file
echo "</pre>"
is_plain=0
fi