Docs: escape MDX braces in changelog body#3533
Merged
Conversation
The previous fix relied on a `format: md` frontmatter hint, but Docusaurus
3.9 still ran the changelog through the MDX pipeline and crashed on
`@php-wasm/{web,node}-5-2`, taking out test-docs-api-reference and the
docs deploy on trunk.
Escape `{` and `}` in the body when the refresh script copies the
changelog over, and unbreak the v3.1.21 entry now so trunk goes green.
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the docs changelog content to be MDX-safe by escaping curly braces so the page renders without triggering MDX expression parsing failures.
Changes:
- Escapes
{and}in the affected changelog entry (@php-wasm/{web,node}-5-2) to prevent MDX runtime errors.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
What happened
#3531 tried to fix the broken docs build by telling Docusaurus to parse
changelog.mdas plain CommonMark instead of MDX — adding aformat: mdfrontmatter to the file. The hope was that Docusaurus would then leave{/}/<…>in PR titles alone.It didn't work. The CI run on trunk for that exact commit still crashed during SSG with:
…on
@php-wasm/{web,node}-5-2. Docusaurus 3.9.2 ran the file through the MDX pipeline anyway, sotest-docs-api-referenceandDeploy doc siteare still red on trunk.I don't fully understand why
format: mdwas ignored here — it might need a globalmarkdown.formatsetting, a different file extension, or it may simply not behave the way the docs imply in this version. Worth a follow-up, but trunk needs to be green now.This PR (workaround)
Stop relying on Docusaurus mode and make the content itself inert:
refresh-changelog.tsnow backslash-escapes{and}in the copied changelog body, so future PR titles with braces stay safe regardless of how Docusaurus parses the file.Test plan
test-docs-api-referencepassesDeploy doc sitepasses