fix: tweak pandoc settings

Switching from `gfm` to `markdown` should enable more formatting options. The extensions have been configured to be similar to `gfm` but provide some additional things, like `line_blocks` and `lists_without_preceding_blankline`s.

(cherry picked from commit 6f6b5042c2)
This commit is contained in:
Kristaps Jurkans
2025-11-14 22:16:17 +02:00
committed by Uri Shaked
parent f686e6106a
commit b34685e0f2
+17 -1
View File
@@ -118,12 +118,28 @@ class DocsHelper:
"""
Run pandoc to convert a given file to typst
"""
# enable/disable certain extensions
# see all with `pandoc --list-extensions=markdown`
# documentation at https://pandoc.org/MANUAL.html
# in general, these extensions should offer some additional formatting options whilst still
# remaining similar to github flavoured markdown
pandoc_extensions = [
"-auto_identifiers",
"+autolink_bare_uris",
"-citations",
"-definition_lists",
"+emoji",
"-example_lists",
"-fancy_lists",
"+lists_without_preceding_blankline",
"-fenced_divs",
]
pandoc_command = [
"pandoc",
path,
"--shift-heading-level-by=-1",
"-f",
"gfm-gfm_auto_identifiers",
f"markdown{''.join(pandoc_extensions)}",
"-t",
"typst-citations",
"--wrap=preserve",