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

feat(richtext-lexical): more lenient MDX JSON object parser that allows unquoted property keys #10205

Merged
merged 3 commits into from
Dec 27, 2024

Conversation

AlessioGr
Copy link
Member

@AlessioGr AlessioGr commented Dec 27, 2024

Previously, the following MDX could not be parsed by lexical:

<RestExamples
  data={[
    {
      operation: "Find"
    }
]}

Instead, it had to be converted into valid JSON:

<RestExamples
  data={[
    {
      "operation": "Find"
    }
]}

This PR permits using the first example, as it swaps out JSON.parse with them ore lenient json5 package parser

@AlessioGr AlessioGr merged commit a46609e into main Dec 27, 2024
68 checks passed
@AlessioGr AlessioGr deleted the feat/lexical-mdx-unqouted-keys branch December 27, 2024 21:41
Copy link
Contributor

🚀 This is included in version v3.12.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant