Skip to content

Conversation

@actuallyzefe
Copy link
Contributor

@actuallyzefe actuallyzefe commented Nov 1, 2025

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:

  • 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

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.

  • Bug Fixes
    • Detect nested list tokens in the listitem renderer.
    • Use parse() for nested items; use parseInline() for simple items.
    • Added tests and snapshots for nested unordered and ordered lists.

Written for commit 85e1954. Summary will update automatically on new commits.

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.
@vercel
Copy link

vercel bot commented Nov 1, 2025

@actuallyzefe is attempting to deploy a commit to the resend Team on Vercel.

A member of the Team first needs to authorize it.

@changeset-bot
Copy link

changeset-bot bot commented Nov 1, 2025

🦋 Changeset detected

Latest commit: 85e1954

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

This PR includes changesets to release 2 packages
Name Type
@react-email/markdown Patch
@react-email/components 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

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 1, 2025

Open in StackBlitz

npm i https://pkg.pr.new/resend/react-email/@react-email/markdown@2624

commit: 85e1954

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a 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

Copy link
Member

@gabrielmfern gabrielmfern left a 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!

@gabrielmfern gabrielmfern merged commit 07d3c71 into resend:canary Nov 3, 2025
7 of 11 checks passed
@lukaskratzel
Copy link

Thank you for addressing the issue 🙌

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.

Nested lists unsupported

3 participants