md2html: use pure python

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2015-10-12 16:42:48 +02:00
parent 76dc7a3371
commit ccb4254104

View File

@ -1,5 +1,7 @@
#!/bin/sh #!/usr/bin/env python
cat <<_EOF import markdown
import sys
print('''
<style> <style>
.markdown-body { .markdown-body {
font-size: 14px; font-size: 14px;
@ -277,7 +279,8 @@ cat <<_EOF
border: none; border: none;
} }
</style> </style>
_EOF ''')
echo "<div class='markdown-body'>" print("<div class='markdown-body'>")
markdown_py -o html5 # Note: you may want to run this through bleach for sanitization
echo "</div>" markdown.markdownFromFile(input=sys.stdin, output_format="html5")
print("</div>")