summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavidovki <david@davidovski.xyz>2023-03-11 17:37:35 +0000
committerdavidovki <david@davidovski.xyz>2023-03-11 17:37:35 +0000
commit13f6c8a0cb24236b2d10ceb0d2cdb138b8b5de82 (patch)
treeebb438436c9b3f5d8c6949471afd091b03a88fce
parenta5fcbde9b233ab2af45ab0c204da1c764d33547a (diff)
Fix formatting
-rwxr-xr-xsrc/md2html.sh12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/md2html.sh b/src/md2html.sh
index 1edc6a1..13719e4 100755
--- a/src/md2html.sh
+++ b/src/md2html.sh
@@ -14,7 +14,7 @@ _pre_strip () {
while [ "$l" != "${l#?}" ]; do
c="${l%*"${l#?}"}"
case "$c" in
- " ") line="$line ";;
+ " ") line="$line ";;
*) line="$line$c" ;;
esac
l="${l#?}"
@@ -311,7 +311,7 @@ _code () {
codeblock=true
}
;;
- "")
+ "")
$codeblock \
&& printf "\n%s" "$ESC_SEQ" \
|| printf "\n"
@@ -321,6 +321,7 @@ _code () {
printf "</code></pre>\n"
codeblock=false
}
+
printf "%s\n" "$line"
;;
esac
@@ -385,14 +386,13 @@ _squash () {
;;
esac
done
- printf "\n"
+ printf "\n"
}
# convert the markdown from stdin into html
#
md2html () {
-
# the order of these somewhat matters
_pre_strip \
| _code \
@@ -414,10 +414,6 @@ md2html () {
| _h 1 \
| _squash \
| _html
-
- cat > /dev/null << EOF
-EOF
}
md2html
-