Skip to content

fix: keep an empty filename empty in Typst - #98

Merged
mcanouil merged 4 commits into
mainfrom
fix/empty-filename-typst
Nov 23, 2026
Merged

mcanouil merged 4 commits into
mainfrom
fix/empty-filename-typst

Conversation

@mcanouil

@mcanouil mcanouil commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

A code block with filename="" now gets a window with an empty title in Typst, which is what HTML already shows.
Typst used to treat the empty string as no filename, so the window took the language label.
Now only a missing filename falls back to the label.

The empty-filename fixture now renders to Typst too, and the test checks for #code-window(filename: "", is-auto: false.

Before After
Typst window for a block with an empty filename, showing the PYTHON label Typst window for a block with an empty filename, with an empty title bar

@mcanouil mcanouil added the Type: Bug 🐛 Issues related to bugs, errors, or mistakes label Nov 22, 2026
@mcanouil mcanouil self-assigned this Nov 22, 2026
@mcanouil
mcanouil marked this pull request as ready for review November 22, 2026 22:24
Typst took an empty filename for a missing one and drew the language label, while HTML keeps the empty title of the window Quarto builds. Both now draw a window with an empty title.
Quarto keeps the filename of an executed cell in its registry, and the filter dropped an empty one there. Typst then drew the language label, and HTML nested an auto window inside the window Quarto builds.
@mcanouil
mcanouil force-pushed the fix/empty-filename-typst branch from 2969470 to 6f8d9f8 Compare November 23, 2026 09:39
@mcanouil
mcanouil merged commit da5b681 into main Nov 23, 2026
2 checks passed
@mcanouil
mcanouil deleted the fix/empty-filename-typst branch November 23, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Bug 🐛 Issues related to bugs, errors, or mistakes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant