astro

a POSIX shell compatible gemini client (mirror of https://github.com/blmayer/astro)
git clone https://git.clttr.info/astro.git
Log (Feed) | Files | Refs (Tags) | README | LICENSE

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:
Mastro | 2+-
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" ""