-
Notifications
You must be signed in to change notification settings - Fork 702
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
'Unexpected closing tag "td". Help! #1838
Comments
We can't reproduce your issue if you don't share a reproduction for it. What was the content for the email template that generates the error? If we were to guess, it would be almost impossible and a waste of time. Going to close this issue as not planned, since it is basically unsolvable without the proper instructions. Share the reproduction and I might reopen if it is satisfactory. |
It’s a straight copy from the react email templates. Will get back |
The email template in question: https://gist.github.com/jim-spr/c3668ec9dc36277e63e744e9fb33565f it's pretty much from the react-email templates. Edit: even sending an empty column. All other components commented out, it breaks. |
Managed to solve this issue by deleting the Column component. Is this deprecated? |
@gabrielmfern I'm seeing this issue, too, with
fails, while this:
works without error. |
@gabrielmfern gabrielmfern |
@gabrielmfern if it helps, I'm wondering if this change from |
Sorry for the delay, looking into this right now! |
as @EleanorLee42 mentioned, this is an issue happening with the way we currently prettify the output from |
The error itself seems to point to this in the HTML standard
|
React doesn't disallow users to write down any invalid HTML, like having divs inside paragraphs, but prettier's HTML formatter seem to be very strict in this sense. It goes without saying, though, that you should not write HTML with divs inside paragraphs, or tds inside tds, since once this HTML gets to the browser they will be rendered differently by following the definitions from the spec and will lead to unexpected behavior. As for the solution on this, I am not quite 100% sure but will keep you all updated. An idea is to still error, but have something clearer. |
Describe the Bug
After bumping react and nextjs to latest, I get this error on all my email renders:
Which throws
Which package is affected (leave empty if unsure)
No response
Link to the code that reproduces this issue
Private repo
To Reproduce
Switching to stable branch everything works. Meaning react 18 / nextjs 14.
Have not changed any code, both render and renderAsync this happens.
Expected Behavior
Email to be rendered
What's your node version? (if relevant)
v20.10.0
The text was updated successfully, but these errors were encountered: