Skip to content

feat: add the cell-output option - #50

Merged
mcanouil merged 5 commits into
mainfrom
feat/exclude-cell-output-39
Sep 1, 2026
Merged

feat: add the cell-output option#50
mcanouil merged 5 commits into
mainfrom
feat/exclude-cell-output-39

Conversation

@mcanouil

Copy link
Copy Markdown
Owner

Quarto writes the result of an executed cell as a code block with no language, inside a cell-output div. 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 the DEFAULT label next to the source it came from.

A new pass marks the code blocks inside a cell-output div 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: true under extensions.code-window frames the output as before.
  • Output that the engine named, through knitr's attr-output for example, is always framed, so HTML and Typst agree on it.
  • Annotations are no longer resolved on unnamed output, so output holding an annotation comment is not rewritten.
  • The internal code-window-auto-label attribute 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: false in 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

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 mcanouil added the Type: Enhancement 💡 Issues related to enhancements, improvements, new features, or new analyses label Aug 31, 2026
@mcanouil mcanouil self-assigned this Aug 31, 2026
@mcanouil
mcanouil marked this pull request as ready for review August 31, 2026 22:45
@mcanouil
mcanouil merged commit e95e8b1 into main Sep 1, 2026
4 checks passed
@mcanouil
mcanouil deleted the feat/exclude-cell-output-39 branch September 1, 2026 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Enhancement 💡 Issues related to enhancements, improvements, new features, or new analyses

Projects

None yet

Development

Successfully merging this pull request may close these issues.

An option to exclude cell-output

1 participant