summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorWynn Wolf Arbor2020-04-10 19:08:00 +0200
committerWynn Wolf Arbor2020-04-11 15:45:18 +0200
commit0828addca51f96f088ac11d786eee6b5a76a0d7f (patch)
tree56f82a9e923e5bd37722e5cf795858ca072e6089
parent1ed1add833dba3249c94bd8cafdf8d61a5f4137e (diff)
downloadsite-0828addca51f96f088ac11d786eee6b5a76a0d7f.tar.gz
util: Have lowdown not skip or escape HTML by default
This commit adds two new flags to the lowdown(1) call in mdconv.sh that control the inclusion and parsing of inline HTML in markedown files: 1) --html-no-skiphtml, which stops lowdown(1) from skipping inline HTML 2) --html-no-escapehtml, which stops lowdown(1) from escaping said HTML For now, this is done unconditionally. We plan to add a tag to the markdown files controlling this behaviour in a future commit.
-rw-r--r--util/mdconv.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/util/mdconv.sh b/util/mdconv.sh
index a3b6831..4385f51 100644
--- a/util/mdconv.sh
+++ b/util/mdconv.sh
@@ -4,6 +4,8 @@ title="$(lowdown -X title "$1")"
date="$(lowdown -X date "$1")"
author="$(lowdown -X author "$1")"
+flags="--html-no-skiphtml --html-no-escapehtml"
+
cat<<EOF
<?xml version="1.0" encoding="UTF-8" ?>
<article data-sblg-article="true">
@@ -13,6 +15,6 @@ cat<<EOF
<a href=".." title="Back to frontpage">↖</a>
<time datetime="$date">$(date -d"$date" '+%A, %B %e, %Y')</time>
</header>
- $(lowdown "$1")
+ $(lowdown $flags "$1")
</article>
EOF