Loading pyproject.toml +1 −1 Original line number Diff line number Diff line [project] name = "coliverter" version = "0.3.1" version = "0.3.2" authors = [ { name="Jakob Moser", email="moser@cl.uni-heidelberg.de" }, ] Loading src/coliverter/steps/md_to_html.py +6 −3 Original line number Diff line number Diff line Loading @@ -12,7 +12,8 @@ def _get_filter(name: str) -> Path: ACTIVE_MARKDOWN_EXTENSIONS = ("autolink_bare_uris", "emoji", "task_lists") PANDOC_OPTIONS = ( INPUT_OPTIONS = ("--strip-comments",) OUTPUT_OPTIONS = ( "--wrap=none", "--standalone", "--css=https://fachschaft.cl.uni-heidelberg.de/wp-content/themes/fscoli-next-master/typography.css", Loading Loading @@ -51,9 +52,11 @@ def md_to_html(markdown: str) -> str: :return: The same text in HTML """ document = pandoc.read( source=markdown, format=f"commonmark_x+{'+'.join(ACTIVE_MARKDOWN_EXTENSIONS)}" source=markdown, format=f"commonmark_x+{'+'.join(ACTIVE_MARKDOWN_EXTENSIONS)}", options=INPUT_OPTIONS, ) _replace(document, TOC_PLACEHOLDER, _get_table_of_contents(document)) return pandoc.write(document, format="html", options=PANDOC_OPTIONS) return pandoc.write(document, format="html", options=OUTPUT_OPTIONS) Loading
pyproject.toml +1 −1 Original line number Diff line number Diff line [project] name = "coliverter" version = "0.3.1" version = "0.3.2" authors = [ { name="Jakob Moser", email="moser@cl.uni-heidelberg.de" }, ] Loading
src/coliverter/steps/md_to_html.py +6 −3 Original line number Diff line number Diff line Loading @@ -12,7 +12,8 @@ def _get_filter(name: str) -> Path: ACTIVE_MARKDOWN_EXTENSIONS = ("autolink_bare_uris", "emoji", "task_lists") PANDOC_OPTIONS = ( INPUT_OPTIONS = ("--strip-comments",) OUTPUT_OPTIONS = ( "--wrap=none", "--standalone", "--css=https://fachschaft.cl.uni-heidelberg.de/wp-content/themes/fscoli-next-master/typography.css", Loading Loading @@ -51,9 +52,11 @@ def md_to_html(markdown: str) -> str: :return: The same text in HTML """ document = pandoc.read( source=markdown, format=f"commonmark_x+{'+'.join(ACTIVE_MARKDOWN_EXTENSIONS)}" source=markdown, format=f"commonmark_x+{'+'.join(ACTIVE_MARKDOWN_EXTENSIONS)}", options=INPUT_OPTIONS, ) _replace(document, TOC_PLACEHOLDER, _get_table_of_contents(document)) return pandoc.write(document, format="html", options=PANDOC_OPTIONS) return pandoc.write(document, format="html", options=OUTPUT_OPTIONS)