Skip to content

fix(website): escape generic angle brackets in benchmark snippets#305

Merged
zantvoort merged 1 commit into
mainfrom
fix/benchmarks-escape-generics
Jul 22, 2026
Merged

fix(website): escape generic angle brackets in benchmark snippets#305
zantvoort merged 1 commit into
mainfrom
fix/benchmarks-escape-generics

Conversation

@zantvoort

Copy link
Copy Markdown
Collaborator

Problem

The Deploy Documentation run for the benchmark page (run 29904706678) failed in the Build Docusaurus step: static generation of /benchmarks aborted with HTML minification failed (Terser), so the deploy never happened.

The hand-highlighted snippets escape the text passed through the token helpers (T(), F(), …), but angle brackets written directly in the template strings reach the HTML raw. Generics such as PredicateBuilder<Pet, *, *> and List<Long> emit a bare < immediately followed by a <span> tag (<<span …). Browsers tolerate that; Terser's HTML parser rejects it and the whole build fails.

Fix

Escape the angle brackets on the 15 affected snippet lines as &lt;/&gt;, the convention the page already uses for its other snippets (e.g. Entity&lt;Long&gt;). The chart's SVG <text> lines are real markup and stay as-is. The copy button unescapes entities, so copied code text is unchanged.

Verification

  • Full production npm run build succeeds and generates build/benchmarks/index.html.
  • The minified output renders the generics correctly (PredicateBuilder&lt;Pet, *, *&gt;, 20 escaped List&lt; occurrences).
  • index.js, the other file touched by feat(website): benchmark page for the 12-workload suite #298, scanned clean for the same pattern.

The hand-highlighted benchmark snippets pass token text through the
escaping helpers, but angle brackets written directly in the template
strings reach the HTML raw. Generics such as PredicateBuilder<Pet, *, *>
and List<Long> emit a bare < immediately followed by a <span> tag, which
the HTML minifier (Terser) rejects, failing static generation of
/benchmarks and the docs deploy.

Escape those brackets as &lt;/&gt;, the convention the page already uses
for its other snippets. The copy button unescapes entities, so copied
code text is unchanged.
Copilot AI review requested due to automatic review settings July 22, 2026 09:03
@zantvoort
zantvoort merged commit 65c86fe into main Jul 22, 2026
7 checks passed
@zantvoort
zantvoort deleted the fix/benchmarks-escape-generics branch July 22, 2026 09:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the Docusaurus static generation failure for /benchmarks by escaping generic angle brackets inside the hand-highlighted benchmark snippet template strings, preventing invalid <<span ...> sequences during HTML minification.

Changes:

  • Replaced raw <...> generic markers written directly in snippet template strings with &lt; / &gt; in the affected benchmark code snippets.
  • Covered generics in multiple benchmark sections (e.g., batch insert, dynamic query, graph insert) so Terser/HTML minification no longer encounters <<span ...> parse errors.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants