X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/1892cd9a603e1eda206c40efb576bd75b7532be6..f69626c68eb64e1a2f6b4ba055409d7205e72757:/filters/html-converters/md2html diff --git a/filters/html-converters/md2html b/filters/html-converters/md2html index c8ee7d9..f505cb2 100755 --- a/filters/html-converters/md2html +++ b/filters/html-converters/md2html @@ -1,7 +1,12 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import markdown +import sys +import io from pygments.formatters import HtmlFormatter -print(''' +from markdown.extensions.toc import TocExtension +sys.stdin = io.TextIOWrapper(sys.stdin.buffer, encoding='utf-8') +sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8') +sys.stdout.write(''' ''') -print("