fix(eql-docs): strip Doxygen <tt> tags so a stray one can't break the build#58
Merged
Conversation
… 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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Ports #52 (merged to
v2) ontomain.Why main needs it too
maincurrently does not build from a clean checkout.prebuildregeneratescontent/stack/reference/eql/index.mdxfrom 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
prebuildruns. That's why it isn't caught by a plainnext 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
064c1766fromfix/eql-docs-strip-tt-tag, one line plus its comment, inescapeMdxSpecials:Resolved one conflict, purely cosmetic:
v2had wrapped the.replacechain in parentheses. I keptmain's formatting and added only the semantic line, so this diff is +6 lines and touches nothing else.Verification
bun run buildonmainfails at the MDX stage.bun run buildpasses, 589 pages generated, and the regeneratedeql/index.mdxcontains zero<tt>occurrences.scripts/generate-eql-docs.tsonly. The regenerated MDX is left untouched in the tree.Two sibling branches,
fix/eql-mdx-escape-ltandfix/eql-docs-mdx-escape, target adjacent problems in the same function and are still unmerged on both branches. Worth deciding whether they're superseded.