modify script to remove unused line skip feature

This commit is contained in:
stev 2023-02-22 00:51:34 +01:00
parent 21091dadfd
commit 0528acafdc

View file

@ -28,7 +28,8 @@ make_gemlogs_index() {
echo "generating index.gmi"
printf '
=> tinylog.gmi tinylogs go here
=> gemlog/index.gmi full gemlogs here\n\n%s' "$(head $WORKDIR/articles.gmi.temp)" \
=> gemlog/index.gmi full gemlogs here
\n%s' "$(head $WORKDIR/articles.gmi.temp)" \
| cat $WORKDIR/in.gmi - > $LGMI/index.gmi
echo "" >> $LGMI/index.gmi
@ -58,21 +59,9 @@ gmi2html() {
continue
fi
# this next condition allows for adding extra line breaks
# with 2 empty lines in a row
if [[ $line == '' ]]; then
if [[ $prev_line_empty == 1 ]]; then
printf "<br>\n"
prev_line_empty=0
else
prev_line_empty=1
fi
continue
elif [[ $prev_line_empty == 1 ]]; then
prev_line_empty=0
fi
case "$line" in
'')
;;
'* '*)
in_list=yes
printf "<ul>\n<li>%s</li>\n" "${line/\* }"