Merge pull request #9 from dylan-lom/#5-header-wrapped-in-p-tag
(#5) Extra to remove <p> tags around <head>
This commit is contained in:
commit
1fbd578186
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env sh
|
||||
md="$(cat)"
|
||||
|
||||
if (echo "$md" | grep -q '</head>'); then
|
||||
md="$(echo "$md" | sed 's/<\/head>/<\/head>\n<body>/')"
|
||||
else
|
||||
md="$(echo "<body>\n$md")"
|
||||
fi
|
||||
|
||||
echo "<!DOCTYPE html>\n<html>\n$md\n</body>\n</html>"
|
|
@ -0,0 +1,2 @@
|
|||
#!/usr/bin/env sh
|
||||
sed 's/<p><head>/<head>/' | sed 's/<\/head><\/p>/<\/head>/'
|
Loading…
Reference in New Issue