X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/8149be213f1c8f52b0dbe6c213f6073af57fa954..1892cd9a603e1eda206c40efb576bd75b7532be6:/filters/html-converters/md2html diff --git a/filters/html-converters/md2html b/filters/html-converters/md2html index 5cab749..c8ee7d9 100755 --- a/filters/html-converters/md2html +++ b/filters/html-converters/md2html @@ -1,2 +1,289 @@ -#!/bin/sh -exec "$(dirname "$0")/resources/markdown.pl" +#!/usr/bin/env python +import markdown +from pygments.formatters import HtmlFormatter +print(''' + +''') +print("
") +# Note: you may want to run this through bleach for sanitization +markdown.markdownFromFile(output_format="html5", extensions=["markdown.extensions.fenced_code", "markdown.extensions.codehilite", "markdown.extensions.tables"], extension_configs={"markdown.extensions.codehilite":{"css_class":"highlight"}}) +print("
")