1
0

Enable table of contents extension

This commit is contained in:
Ryan Fox 2021-03-30 01:32:35 +00:00
parent 726d9418b9
commit 256566a141
Signed by: flewkey
GPG Key ID: 94F56ADFD848851E

View File

@ -5,7 +5,7 @@ import markdown
from template import template
def main():
md = markdown.Markdown(extensions = ["meta", "extra"])
md = markdown.Markdown(extensions = ["meta", "extra", "toc"])
with open(sys.argv[1], "r", encoding="utf-8") as file_in:
html = md.convert(file_in.read())
output = template(html, sys.argv[2], ".html", md.Meta) if "template" in md.Meta else html