Skip to content
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

docs: actually demo the zero-width space workaround in MDX #8352

Merged
merged 1 commit into from Nov 24, 2022

Conversation

waldyrious
Copy link
Contributor

@waldyrious waldyrious commented Nov 17, 2022

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

Currently the documentation at https://docusaurus.io/docs/markdown-features/react#markdown-and-jsx-interoperability offers a workaround to the issue "A paragraph starting with a JSX tag will be seen entirely as a JSX string", but the demo of the workaround is using actual HTML instead of markdown. This change actually makes the demo show what it's claiming :)

Test Plan

Test links

https://deploy-preview-8352--docusaurus-2.netlify.app/docs/markdown-features/react#markdown-and-jsx-interoperability

Before:

image

After:

image

Related issues/PRs

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Nov 17, 2022
@netlify
Copy link

netlify bot commented Nov 17, 2022

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit f963ea2
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/63767ffe00f41a0008501eb5
😎 Deploy Preview https://deploy-preview-8352--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🟠 70 🟢 97 🟢 100 🟢 100 🟢 90 Report
/docs/installation 🟠 71 🟢 100 🟢 100 🟢 100 🟢 90 Report

@slorber slorber added the pr: documentation This PR works on the website or other text documents in the repo. label Nov 24, 2022
@slorber
Copy link
Collaborator

slorber commented Nov 24, 2022

LGTM thanks 👍

Note I think this won't be necessary anymore with MDX 2

@slorber slorber changed the title Docs: Actually demo the zero-width space workaround in MDX docs: actually demo the zero-width space workaround in MDX Nov 24, 2022
@slorber slorber merged commit 6be3beb into facebook:main Nov 24, 2022
@waldyrious waldyrious deleted the patch-1 branch November 24, 2022 11:47
@waldyrious
Copy link
Contributor Author

Note I think this won't be necessary anymore with MDX 2

Yeah, the page already hints at this:

Docusaurus v2 is using MDX v1, which has a lot of known cases where the content fails to be correctly parsed as Markdown.

For future reference, here's the link to the issue about adopting MDX v2: #4029

This was referenced Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: documentation This PR works on the website or other text documents in the repo.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants