test: document intentional raw-HTML drop in the Typst renderer#72
Merged
Conversation
…ess#117) Pin the intentional silent-drop of raw/inline HTML in the Typst renderer. PolicyPress's build pre-flight relies on this behaviour to flag raw HTML in policy bodies, so a test makes the contract explicit: if it ever changes, the failure surfaces here. Renderer behaviour is unchanged.
This was referenced Jul 8, 2026
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.
What
Adds one test to the Typst renderer pinning its intentional silent-drop of raw/inline HTML:
<div>…</div>) renders to nothing;No renderer behaviour changes — this is a contract test only.
Why
zigmark's Typst renderer omits
html_block/html_in_line(they have no Typst equivalent), while the HTML renderer keeps them. Downstream, PolicyPress relies on exactly this: its build pre-flight now flags raw HTML in policy bodies because the site would render it but the PDF would not (sc2in/PolicyPress#117). This test makes that contract explicit so a future change to the drop behaviour fails here rather than silently shifting PolicyPress's assumptions.Test
zig build test— 306/306 pass (was 304; +2 assertions in the new test).