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

Fix @udecode/plate-markdown deserializing list with indented block element #3591

Merged
merged 2 commits into from
Sep 29, 2024

Conversation

depressedX
Copy link
Contributor

brief

it will throw error when deserializing list with indented block element (eg. code block) using @udecode/plate-markdown

- 1
- 2
  - 2.1
  ```
  2.2 code
  ```

it expects to render a nested code block element like this rendered by github:


  • 1
  • 2
    • 2.1
    2.2 code
    

while using @udecode/plate-markdown to deserializing it will throw runtime errors.

problem

@udecode/plate-markdown will treat every child of list as listItem. But it's totally legal to put another element into list

Copy link

codesandbox bot commented Sep 29, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

changeset-bot bot commented Sep 29, 2024

🦋 Changeset detected

Latest commit: 40cd0d7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@udecode/plate-markdown Patch
@udecode/plate Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Sep 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
plate ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 29, 2024 8:45am

@zbeyens
Copy link
Member

zbeyens commented Sep 29, 2024

Thanks for the PR @depressedX !

@zbeyens zbeyens merged commit 2f74e50 into udecode:main Sep 29, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants