From cdcc977f598bfeb62bff643392dadf43767791cc Mon Sep 17 00:00:00 2001 From: Dylan Lom Date: Sat, 6 Feb 2021 18:02:21 +1100 Subject: [PATCH 1/2] (#5) Add script to remove p tags around head --- extras/shmd-tidy-head.sh | 2 ++ 1 file changed, 2 insertions(+) create mode 100755 extras/shmd-tidy-head.sh diff --git a/extras/shmd-tidy-head.sh b/extras/shmd-tidy-head.sh new file mode 100755 index 0000000..56dd1bd --- /dev/null +++ b/extras/shmd-tidy-head.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +sed 's/

//' | sed 's/<\/head><\/p>/<\/head>/' From 0e827d0fada003d431f55379b40631980a27bc10 Mon Sep 17 00:00:00 2001 From: Dylan Lom Date: Sat, 6 Feb 2021 18:11:57 +1100 Subject: [PATCH 2/2] (#5) Add shmd-good-html script --- extras/shmd-good-html.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 extras/shmd-good-html.sh diff --git a/extras/shmd-good-html.sh b/extras/shmd-good-html.sh new file mode 100755 index 0000000..1681ddf --- /dev/null +++ b/extras/shmd-good-html.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env sh +md="$(cat)" + +if (echo "$md" | grep -q ''); then + md="$(echo "$md" | sed 's/<\/head>/<\/head>\n/')" +else + md="$(echo "\n$md")" +fi + +echo "\n\n$md\n\n"