Allow tabs in fenced code blocks
This commit is contained in:
parent
256566a141
commit
33f581ad10
@ -3,9 +3,10 @@
|
||||
import sys
|
||||
import markdown
|
||||
from template import template
|
||||
from pymdownx.superfences import SuperFencesCodeExtension
|
||||
|
||||
def main():
|
||||
md = markdown.Markdown(extensions = ["meta", "extra", "toc"])
|
||||
md = markdown.Markdown(extensions = ["meta", "extra", "toc", SuperFencesCodeExtension(preserve_tabs=True)])
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user