-
Notifications
You must be signed in to change notification settings - Fork 868
fix(markdown): support nested lists in markdown component #2624
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(markdown): support nested lists in markdown component #2624
Conversation
Fixes resend#2599 Previously, nested lists would crash with 'Token with "list" type was not found' error because the listitem renderer used parseInline() which only handles inline tokens. Changes: - Updated listitem renderer to detect nested lists - Use parse() for list items with nested content - Use parseInline() for simple list items (backward compatible) - Added test case for nested lists The fix maintains backward compatibility by only using parse() when needed, preventing unnecessary <p> tag wrapping in simple lists.
|
@actuallyzefe is attempting to deploy a commit to the resend Team on Vercel. A member of the Team first needs to authorize it. |
🦋 Changeset detectedLatest commit: 85e1954 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
commit: |
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.
No issues found across 3 files
gabrielmfern
left a comment
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 look great! Thank you!
|
Thank you for addressing the issue 🙌 |
Fixes #2599
Previously, nested lists would crash with 'Token with "list" type was not found' error because the listitem renderer used parseInline() which only handles inline tokens.
Changes:
The fix maintains backward compatibility by only using parse() when needed, preventing unnecessary
tag wrapping in simple lists.
Summary by cubic
Fixes a crash in the Markdown component when rendering nested lists. Nested list items are now parsed as blocks, while simple items remain inline to avoid extra paragraph tags.
Written for commit 85e1954. Summary will update automatically on new commits.