refactor: read a block's overrides in one place - #67
Merged
Merged
Conversation
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
marked this pull request as ready for review
September 21, 2026 09:52
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.
process_htmlandresolve_window_paramsopened the same way: readcode-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_overridesanswers all four. Collapse stays at the HTML call site, because it is the one override the Typst path never reads.process_htmlalso 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.qmdrenders byte-identical tomainin HTML, Typst and Reveal.js, and the documentation site renders with no warnings. Three review rounds, the last with no findings.