Fix MDX parsing by escaping curly braces in JSDoc comment#174
Merged
Jesse Seldess (jseldess) merged 1 commit intomainfrom Feb 20, 2026
Merged
Fix MDX parsing by escaping curly braces in JSDoc comment#174Jesse Seldess (jseldess) merged 1 commit intomainfrom
Jesse Seldess (jseldess) merged 1 commit intomainfrom
Conversation
Escape {{ and {% in the JSDoc comment for templateUsesThreadVariables
to prevent them from being interpreted as JSX expressions when generating
MDX documentation.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Braintrust eval reportAutoevals (fix-mdx-parsing-in-jsdoc-1771619907)
|
Anna Wang (annalinwang)
approved these changes
Feb 20, 2026
Braintrust eval report
|
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.
Summary
Escapes
{{and{%in the JSDoc comment fortemplateUsesThreadVariablesto prevent them from being interpreted as JSX expressions when generating MDX documentation.Problem
The TypeScript reference docs (versions 0.0.131 and 0.0.132) were failing to parse with the error:
This was caused by unescaped curly braces in the JSDoc comment at line 48 of
js/llm.ts.Solution
Wrapped the template syntax examples in backticks to make them inline code, which prevents the MDX parser from treating them as JSX expressions.
Testing
After this fix is merged and the submodule is updated in the braintrust repo, the docs will need to be regenerated using:
🤖 Generated with Claude Code