Skip to content

Markdown in email - value.includes in escapeQuotes #1632

@MartinN3

Description

@MartinN3

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions