… 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.
Ports #52 (merged to v2) onto main.
Why main needs it too
main currently does not build from a clean checkout. prebuild regenerates content/stack/reference/eql/index.mdx from the upstream EQL manifest, which emits a stray unclosed <tt> tag. MDX requires balanced tags, so the whole build fails:
The committed copy of that file is fine, so the failure only appears once prebuild runs. That's why it isn't caught by a plain next build.
<tt> is lowercase-led, so the existing <-escaping rule deliberately leaves it alone (it looks like a real HTML tag). MDX doesn't need it, so the fix drops it.
The change
Cherry-picked 064c1766 from fix/eql-docs-strip-tt-tag, one line plus its comment, in escapeMdxSpecials:
Resolved one conflict, purely cosmetic: v2 had wrapped the .replace chain in parentheses. I kept main's formatting and added only the semantic line, so this diff is +6 lines and touches nothing else.
Verification
Two sibling branches, fix/eql-mdx-escape-lt and fix/eql-docs-mdx-escape, target adjacent problems in the same function and are still unmerged on both branches. Worth deciding whether they're superseded.