Skip to content

test: document intentional raw-HTML drop in the Typst renderer#72

Merged
sc2ben merged 3 commits into
mainfrom
117-document-raw-html-drop
Jul 8, 2026
Merged

test: document intentional raw-HTML drop in the Typst renderer#72
sc2ben merged 3 commits into
mainfrom
117-document-raw-html-drop

Conversation

@tsunaminoai

Copy link
Copy Markdown
Contributor

What

Adds one test to the Typst renderer pinning its intentional silent-drop of raw/inline HTML:

  • block HTML (<div>…</div>) renders to nothing;
  • inline HTML drops only the tags, keeping the enclosed text.

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).

…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.
@sc2ben sc2ben added testing Tests for common compliance chore Chore needed to maintain the quality of the code without material change. labels Jul 8, 2026
@sc2ben sc2ben self-requested a review July 8, 2026 15:26
@sc2ben sc2ben merged commit d21cf7e into main Jul 8, 2026
4 checks passed
@sc2ben sc2ben deleted the 117-document-raw-html-drop branch July 8, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Chore needed to maintain the quality of the code without material change. testing Tests for common compliance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants