mirror of
https://git.zx2c4.com/cgit
synced 2024-12-22 07:01:52 +00:00
md2html: use pure python
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
76dc7a3371
commit
ccb4254104
@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
cat <<_EOF
|
||||
#!/usr/bin/env python
|
||||
import markdown
|
||||
import sys
|
||||
print('''
|
||||
<style>
|
||||
.markdown-body {
|
||||
font-size: 14px;
|
||||
@ -277,7 +279,8 @@ cat <<_EOF
|
||||
border: none;
|
||||
}
|
||||
</style>
|
||||
_EOF
|
||||
echo "<div class='markdown-body'>"
|
||||
markdown_py -o html5
|
||||
echo "</div>"
|
||||
''')
|
||||
print("<div class='markdown-body'>")
|
||||
# Note: you may want to run this through bleach for sanitization
|
||||
markdown.markdownFromFile(input=sys.stdin, output_format="html5")
|
||||
print("</div>")
|
||||
|
Loading…
Reference in New Issue
Block a user