Skip to content

fix(eql-docs): strip Doxygen <tt> tags so a stray one can't break the build#52

Merged
coderdan merged 1 commit into
v2from
fix/eql-docs-strip-tt-tag
Jul 8, 2026
Merged

fix(eql-docs): strip Doxygen <tt> tags so a stray one can't break the build#52
coderdan merged 1 commit into
v2from
fix/eql-docs-strip-tt-tag

Conversation

@coderdan

@coderdan coderdan commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Problem

Vercel builds started failing on every v2-lineage branch (first seen on PR #45):

./content/stack/reference/eql/index.mdx
2153: Expected a closing tag for `<tt>` before the end of `paragraph`
Error: Turbopack build failed

scripts/generate-eql-docs.ts regenerates that page during prebuild from the latest encrypt-query-language release's API.md. Its escaper deliberately passes lowercase-led tags (<tt>) through as real HTML, but MDX requires every tag to be balanced. eql-3.0.0-alpha.3 (published today) has a mangled SQL comment whose Doxygen output emits a stray, unclosed <tt> at line 2153 — taking down the whole build.

This is not specific to #45: any branch (and main) that rebuilds while alpha.3 is the latest release hits it.

Fix

Strip Doxygen's <tt>/</tt> teletype tags (non-code text only) before escaping. MDX doesn't need the tag, so malformed upstream docs now degrade gracefully instead of failing the deploy. One-line change in escapeMdxSpecials.

Verification

  • Regenerated content/stack/reference/eql/index.mdx from the live eql-3.0.0-alpha.3 release → <tt> count is 0; line 2153 is valid MDX.
  • next build compiles cleanly, all 329 static pages generated.
  • Only scripts/generate-eql-docs.ts changes; the committed page snapshot is left as-is (it's build-regenerated).

Notes

  • main is exposed too (same generator + generate-docs:eql in its prebuild), so a production redeploy would hit this. Recommend porting this fix to main as well — happy to open that PR.
  • The underlying content is still garbled upstream ('sel'::text rendered as 'seltext); that's a Doxygen/SQL-comment issue for the EQL repo to fix. This PR only stops it from breaking the docs build.

… build

The EQL reference generator fetches the latest release's API.md at build time
and passes lowercase-led tags (e.g. `<tt>`) through as real HTML. MDX requires
every tag to be balanced, so a mangled SQL-comment source that emits an
unclosed `<tt>` fails the whole Vercel build — which is exactly what
eql-3.0.0-alpha.3 did (index.mdx:2153, `Expected a closing tag for <tt>`).

`<tt>` is Doxygen's teletype tag; MDX doesn't need it. Strip `<tt>`/`</tt>`
(non-code text only) before escaping, so malformed upstream docs degrade
gracefully instead of taking the deploy down.

Verified: regenerated content/stack/reference/eql/index.mdx from the live
eql-3.0.0-alpha.3 release and `next build` compiles all 329 pages.
@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
public-docs Ready Ready Preview, Comment Jul 8, 2026 6:49am

Request Review

@coderdan coderdan merged commit fd4ddbb into v2 Jul 8, 2026
2 checks passed
coderdan added a commit that referenced this pull request Jul 8, 2026
The `auth regions --json` flag description is "Emit machine-readable
[{ slug, label }] ...". MDX parsed `{ slug, label }` as a JS expression,
so prerendering /reference/cli/auth threw `ReferenceError: slug is not
defined` and failed the build. (The earlier `<tt>` failure masked this;
it surfaced once #52 landed via rebase.)

Escape `{`/`}` (and stray `<`) in manifest-derived prose — flag
descriptions and summaries. Flag names/values stay in code spans, which
are literal, so they're untouched. Verified: `next build` prerenders all
355 pages, including /reference/cli/auth.
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.

1 participant