From 7e4e1045a9d205c53faf95564d53a141aff2ed19 Mon Sep 17 00:00:00 2001 From: Kristaps Jurkans Date: Thu, 30 Oct 2025 13:10:21 +0000 Subject: [PATCH 1/3] Fix white page when funding was not specified This was caused by creating a page before first checking whether there was any content for that page beforehand, so it would result in a rogue white page with no content. --- docs/typst/src/datasheet.typ | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/docs/typst/src/datasheet.typ b/docs/typst/src/datasheet.typ index 0588ba3..e5ec810 100644 --- a/docs/typst/src/datasheet.typ +++ b/docs/typst/src/datasheet.typ @@ -494,20 +494,23 @@ }) // add funding/sponsor page - page(context { - let funding_content = _funding_content.final() - let alt_title = _funding_alt_title.final() + context { + // check if funding has been provided, otherwise we risk adding an empty page instead + if _funding_content.final() != [] { + page({ + let funding_content = _funding_content.final() + let alt_title = _funding_alt_title.final() - if funding_content != [] { - if alt_title != none { - heading(level: 1, alt_title) - } else { - heading(level: 1, "Funding") - } + if alt_title != none { + heading(level: 1, alt_title) + } else { + heading(level: 1, "Funding") + } + + funding_content + }) } - - funding_content - }) + } page(include "../chapters/team.typ") page(include "../chapters/using-this-datasheet.typ") From b8c4e91ab19aec125817666f01d53dd888837346 Mon Sep 17 00:00:00 2001 From: Kristaps Jurkans Date: Thu, 30 Oct 2025 13:34:20 +0000 Subject: [PATCH 2/3] Fix missing analog pin tables --- doc_utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc_utils.py b/doc_utils.py index ae2c57b..c2d25f6 100644 --- a/doc_utils.py +++ b/doc_utils.py @@ -305,6 +305,10 @@ class DocsHelper: content["is_wokwi"] = True content["project_wokwi_id"] = info["wokwi_id"] + if info["is_analog"]: + content["is_analog"] = True + content["analog_pins"] = DocsHelper.format_analog_pins(info["analog_pins"]) + return content @staticmethod From 6f6b5042c2354d5292de960c1ba69d94bb357fbf Mon Sep 17 00:00:00 2001 From: Kristaps Jurkans Date: Thu, 30 Oct 2025 15:27:41 +0000 Subject: [PATCH 3/3] 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. --- doc_utils.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/doc_utils.py b/doc_utils.py index c2d25f6..f9228a7 100644 --- a/doc_utils.py +++ b/doc_utils.py @@ -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",