Repository navigation
fix: leave Quarto's book title-block code block alone - #89
Merged
Merged
Conversation
A book rendered to one file puts each chapter's front matter into a code block with the class quarto-title-block, which a Quarto filter later replaces with the chapter's title block. code-window wrapped it first, so an empty "quarto-title-block" window showed at the start of the chapter.
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.
When a Quarto book is rendered to one file (Typst, PDF, DOCX, EPUB), Quarto puts the front matter of each chapter into a code block with the class
quarto-title-block.A Quarto filter later finds that block by its class and replaces it with the chapter's title block.
code-window ran first and wrapped it, so an empty window named "quarto-title-block" showed at the start of any chapter with its own front matter.
The language pass, the HTML pass and the Typst pass now skip that block, so it reaches Quarto as Quarto wrote it.
HTML books render each chapter on its own page and never get this block.
I found no other code block that Quarto inserts with a
quarto-class, so the check names this one class only.A small book fixture under
tests/fixtures/book/renders to Typst, andtests/run.shchecks that only the chapter's own code block gets a window.The test fails without the fix and the full suite passes with it.