fix(docs): use bracket syntax for admonition titles#5159
Merged
Conversation
Convert legacy space-separated admonition titles (`:::warning Deprecated`) to the MDX directive bracket form (`:::warning[Deprecated]`). Docusaurus 3 / MDX 3 (with the v4 future flag) no longer parse the space-title form, so the `:::` fences rendered as literal text on pages such as Building For TV. The bracket form is already used elsewhere in the docs; this fixes the remaining stragglers. 54 occurrences across 48 files (docs/ and versioned_docs/version-0.86).
Collaborator
|
Nice catch! 👍 Looks like I have missed one admonition type in: |
Simek
approved these changes
Jun 28, 2026
Simek
left a comment
Collaborator
There was a problem hiding this comment.
Tested the changes on the preview deployment, LGTM! 👍
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.
Fixes #5158.
Summary
Convert legacy space-separated admonition titles (
:::warning Deprecated) to the MDX directive bracket form (:::warning[Deprecated]).Docusaurus 3 / MDX 3 (with the
future.v4flag enabled indocusaurus.config.ts) no longer parse the space-title form, soremark-directiveleaves the block as a plain paragraph and the:::fences render as literal text (e.g. on Building For TV). Inline markdown inside the block still renders, which is why only the:::markers looked broken.The bracket form is already the convention across the rest of the docs (e.g.
:::danger[Removed from React Native],:::note[Hint]); this migrates the remaining stragglers.Before:

After:

Changes
docs/and theirwebsite/versioned_docs/version-0.86/copies.Test plan
yarn prettier --checkpasses on all 48 changed files (theendOfLine: autoconfig leaves the CRLF files intact, label on a single line).:::type <Title>(space) currently renders literal:::, while pages using the bracket form:::type[Title]render correctly — so the converted pages now match the working syntax.