-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(v2): render escaped HTML entities inside code properly #4598
Conversation
@@ -14,17 +14,28 @@ import type {MDXComponentsObject} from '@theme/MDXComponents'; | |||
const MDXComponents: MDXComponentsObject = { | |||
code: (props) => { | |||
const {children} = props; | |||
if (typeof children === 'string') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line of code causes current bug because HTML entities come as an array of strings, not a regular string.
[V1] Built with commit d032e4c |
[V2] Built with commit d032e4c |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-4598--docusaurus-2.netlify.app/ |
Size Change: 0 B Total Size: 576 kB ℹ️ View Unchanged
|
thanks 👍 LGTM |
Motivation
Fixes #4534
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Preview - https://deploy-preview-4598--docusaurus-2.netlify.app/examples/markdownPageExample#pipe
Related PRs
(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)