all repos — cgit @ ccb4254104ad6faa9225ce91b9a0610f24958022

a hyperfast web frontend for git written in c

md2html: use pure python

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld Jason@zx2c4.com
Mon, 12 Oct 2015 16:42:48 +0200
commit

ccb4254104ad6faa9225ce91b9a0610f24958022

parent

76dc7a3371e487fdc9de7b3b4c991fe370598f0e

1 files changed, 9 insertions(+), 6 deletions(-)

jump to
M filters/html-converters/md2htmlfilters/html-converters/md2html

@@ -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 @@ background-color: transparent;

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>")