commit ce0b7c5bf393d800df9a95f7dd733ec0825886d3
parent bc9ab5796bdadefa31ef2274fd233fc7f33abdb0
Author: René Wagner <rwa@clttr.info>
Date: Wed, 1 Feb 2023 16:14:58 +0100
escape % in gemtext while typesetting
otherwise the % will be treated as a formatting directive
for printf and the text will be crippled
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/astro b/astro
@@ -204,7 +204,7 @@ typesetgmi() {
'* '*) sty="" && line=" $sty_listb•$sty_listt$(echo "$line" | cut -c 2-)";;
*) sty="";;
esac
- echo "$line" | fold -w "$width" -s | {
+ echo ${line//%/%%} | fold -w "$width" -s | {
while IFS='' read -r txt
do
printf "%*s" "$margin" ""