feat: add the cell-output option - #50
Merged
Merged
Conversation
Quarto writes the output of an executed cell as a code block with no language, which the filter could not tell apart from a fenced block written without one. Output was labelled DEFAULT and framed like source. Output now keeps the shape Quarto gives it. Set cell-output to true to frame it again. Closes #39
Read the configuration once per document and walk the tree only when the output has to stay unframed. Drop the unused opt-out return value of resolve_window_params.
An engine can name an output block, through knitr's attr-output for example. HTML framed that block through Quarto's own wrapper while Typst did not, so the two formats disagreed.
The language pass runs whether the extension is on or off, so cell output was relabelled with enabled: false and the internal auto-label attribute reached the rendered document.
Annotations were resolved on an unnamed output block before the window was skipped, so output that holds an annotation comment was rewritten. The internal auto-label attribute also reached the document on the paths that return before the auto-filename branch.
mcanouil
marked this pull request as ready for review
August 31, 2026 22:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Quarto writes the result of an executed cell as a code block with no language, inside a
cell-outputdiv. The filter saw that block on its own, could not tell it apart from a fenced block written without a language, and framed it with theDEFAULTlabel next to the source it came from.A new pass marks the code blocks inside a
cell-outputdiv while their parent is still in reach, and the language and window passes leave a marked block alone. Output now keeps the shape Quarto gives it, in HTML, Reveal.js and Typst.cell-output: trueunderextensions.code-windowframes the output as before.attr-outputfor example, is always framed, so HTML and Typst agree on it.code-window-auto-labelattribute no longer reaches the rendered document.Verified by rendering executed-cell documents to HTML, Reveal.js and Typst, with the option off and on, with
enabled: falsein both states, with a named output block, and with output holding an annotation comment. No fixture in the repository exercises this, because an executed cell would make every CI render need R or Python.Closes #39