resend / react-email

💌 Build and send emails using React
https://react.email
MIT License
14.58k stars 670 forks source link

Markdown in email - value.includes in escapeQuotes #1632

Open MartinN3 opened 3 months ago

MartinN3 commented 3 months ago

Describe the Bug

When using markdownCustomStyles, parseCssInJsToInlineCss calls escapeQuotes on fontWeight: 500, in h1 tag and that fails but when using fontWeight: '500' it goes trough.

Which package is affected (leave empty if unsure)

react-email

Link to the code that reproduces this issue

is there a default repo we can clone and tailor?

To Reproduce

<Markdown
        children={`# Welcome to`}
        markdownCustomStyles={{
          h1: {
            fontSize: 70,
            fontWeight: 500,
          },
        }}
      />
"dependencies": {
        "@react-email/components": "0.0.23",
        "@react-email/render": "^1.0.0",
        "express": "4.19.2",
        "react": "18.3.1",
        "react-dom": "18.3.1",
        "react-email": "^3.0.1",
        "typescript": "^5.5.4"
 },

Expected Behavior

I think you would wanna override h1 fontWeight and you would do it easily by specifying fontWeight: 500, right?

What's your node version? (if relevant)

No response

VedantPatel04 commented 1 month ago

I'm working on this!

Hainesy commented 1 month ago

Any update on this? Thanks

gabrielmfern commented 2 weeks ago

Just released @react-email/markdown@0.0.13-canary.1/@react-email/components@0.0.29-canary.2 that fixes this issue. Once we merge the fix into stable, I'll close out this issue.