site

My personal website.

Date: Mon, 12 Jul 2021 14:43:34 +0200

Fix bug in generate

Diffstat:

M generate                            |       9 ++++++---

1 file changed, 6 insertions(+), 3 deletions(-)

@@ -26,15 +26,18 @@ while read -r file <&4; do
             case "$line" in
                 '```'*)
                     preformatted=""
-                    [ $output = "html" ] && echo "</pre></code>"
+                    [ $output = "html" ] && printf "</pre></code>\n"
+                    [ $output = "gopher" ] && printf "\n"
                     ;;
                 *)
                     line="$(escape "$line")"
                     if [ "$preformatted" = "first" ]; then
-                        printf "%s" "$line"
+                        [ $output = "html" ] && printf "%s" "$line"
+                        [ $output = "gopher" ] && printf "t%s" "$line"
                         preformatted="yes"
                     else
-                        printf "\n%s" "$line"
+                        [ $output = "html" ] && printf "\n%s" "$line"
+                        [ $output = "gopher" ] && printf "\nt%s" "$line"
                     fi
                     ;;
             esac