commit 4056cc421d02e7b8df426551954814f15195afa9
parent 9690f8948dca5fdb0ad492ed5a44b53e68a8af7c
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date: Sun, 29 May 2022 13:14:45 +0200
Workaround for a bug in lowdown
Diffstat:
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/build.sh b/build.sh
@@ -19,8 +19,14 @@ recursivebuild() {
lowdown "$1/$file" >> "$destdir/index.html"
cat bottom.html >> "$destdir/index.html"
+ # TODO: the following lines contain a dirty fix
+ # to deal with a bug in lowdown. Remove all the
+ # sed lines when fixed.
lowdown -Tgemini --gemini-link-roman \
- "$1/$file" > "$destdir_gmi/index.gmi"
+ "$1/$file" \
+ | sed '/```./i```' \
+ | sed '/```./ s/```//' \
+ > "$destdir_gmi/index.gmi"
cat bottom.gmi >> "$destdir_gmi/index.gmi"
elif [ "$extension" = "html" ]; then
cat top.html "$1/$file" bottom.html \