Skip to content

refactor: read a block's overrides in one place - #67

Merged
mcanouil merged 3 commits into
mainfrom
refactor/window-overrides-prologue
Sep 21, 2026
Merged

mcanouil merged 3 commits into
mainfrom
refactor/window-overrides-prologue

Conversation

@mcanouil

Copy link
Copy Markdown
Owner

process_html and resolve_window_params opened the same way: read code-window-enabled, return early when the block turns the chrome off, then read the style, the lines label and the no-auto-filename flag.

read_window_overrides answers all four. Collapse stays at the HTML call site, because it is the one override the Typst path never reads. process_html also gains a small closure for the marker classes, which it was applying twice in the same shape.

Two earlier reviews asked for this extraction, and it was left alone until the render check existed. That caution was earned: the previous attempt at sharing code between these two functions removed the cell-output marker and emptied the resolved table, and a review caught both rather than a test.

No behaviour changes, so there is no changelog entry.

Sixteen tests pass, example.qmd renders byte-identical to main in HTML, Typst and Reveal.js, and the documentation site renders with no warnings. Three review rounds, the last with no findings.

The two format paths opened the same way: read code-window-enabled,
return early when the block turns the chrome off, then read the style,
the lines label and the no-auto-filename flag. Two reviews asked for the
duplication to go, and it was left in place until a check existed that
could catch a mistake in moving it.

read_window_overrides answers all four. Collapse stays where it was,
because it is the one override the Typst path never reads. The HTML path
also gains a local for the marker classes, which it applied twice in the
same shape.
@mcanouil mcanouil self-assigned this Sep 21, 2026
@mcanouil mcanouil added the Type: Refactor 🔥 Issues related to refactoring, restructuring, or cleaning up label Sep 21, 2026
@mcanouil
mcanouil marked this pull request as ready for review September 21, 2026 09:52
@mcanouil
mcanouil merged commit 443acfe into main Sep 21, 2026
4 checks passed
@mcanouil
mcanouil deleted the refactor/window-overrides-prologue branch September 21, 2026 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Refactor 🔥 Issues related to refactoring, restructuring, or cleaning up

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant