You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exports[`<Markdown> component renders correctly > renders links in the correct format for browsers 1`] = `
4
+
"<!DOCTYPE html PUBLIC \\"-//W3C//DTD XHTML 1.0 Transitional//EN\\" \\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\\"><divdata-id=\\"react-email-markdown\\"><p>Linkto<ahref=\\"https://react.email\\"target=\\"_blank\\"style=\\"color:#007bff;text-decoration:underline;background-color:transparent\\">React-email</a></p>
5
+
</div>"
6
+
`;
7
+
8
+
exports[`<Markdown>componentrenderscorrectly > renders lists in the correct format for browsers 1`] = `
9
+
"<!DOCTYPE html PUBLIC \\"-//W3C//DTD XHTML 1.0 Transitional//EN\\" \\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\\"><divdata-id=\\"react-email-markdown\\"><h1style=\\"font-weight:500;padding-top:20px;font-size:2.5rem\\">Belowisalist</h1><ul>
10
+
<li>ItemOne</li>
11
+
<li>ItemTwo</li>
12
+
<li>ItemThree</li>
13
+
</ul>
14
+
</div>"
15
+
`;
16
+
17
+
exports[`<Markdown>componentrenderscorrectly > renders text in the correct format for browsers 1`] = `
18
+
"<!DOCTYPE html PUBLIC \\"-//W3C//DTD XHTML 1.0 Transitional//EN\\" \\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\\"><divdata-id=\\"react-email-markdown\\"><p><strongstyle=\\"font-weight:bold\\">Thisissampleboldtextinmarkdown</strong>and<emstyle=\\"font-style:italic\\">thisisitalictext</em></p>
19
+
</div>"
20
+
`;
21
+
22
+
exports[`<Markdown>componentrenderscorrectly > renders the headers in the correct format for browsers 1`] = `"<!DOCTYPE html PUBLIC \\"-//W3C//DTD XHTML 1.0 Transitional//EN\\" \\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\\"><divdata-id=\\"react-email-markdown\\"><h1style=\\"font-weight:500;padding-top:20px;font-size:2.5rem\\">Heading1!</h1><h2style=\\"font-weight:500;padding-top:20px;font-size:2rem\\">Heading2!</h2><h3style=\\"font-weight:500;padding-top:20px;font-size:1.75rem\\">Heading3!</h3><h4style=\\"font-weight:500;padding-top:20px;font-size:1.5rem\\">Heading4!</h4><h5style=\\"font-weight:500;padding-top:20px;font-size:1.25rem\\">Heading5!</h5><h6style=\\"font-weight:500;padding-top:20px;font-size:1rem\\">Heading6!</h6></div>"`;
23
+
24
+
exports[`<Markdown>componentrenderscorrectly > renders the markdown in the correct format for browsers 1`] = `
25
+
"<!DOCTYPE html PUBLIC \\"-//W3C//DTD XHTML 1.0 Transitional//EN\\" \\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\\"><divdata-id=\\"react-email-markdown\\"><h1style=\\"font-weight:500;padding-top:20px;font-size:2.5rem\\">MarkdownTestDocument</h1><p>Thisisa<strongstyle=\\"font-weight:bold\\">testdocument</strong>tocheckthecapabilitiesofaMarkdownparser.</p>
"<!DOCTYPE html PUBLIC \\"-//W3C//DTD XHTML 1.0 Transitional//EN\\" \\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\\"><div data-id=\\"react-email-markdown\\"><h1 style=\\"font-weight:500;padding-top:20px;font-size:2.5rem\\" data-id=\\"react-email-heading\\">Markdown Test Document</h1><p data-id=\\"react-email-text\\">This is a <strong style=\\"font-weight:bold\\">test document</strong> to check the capabilities of a Markdown parser.</p>
60
-
<h2 style=\\"font-weight:500;padding-top:20px;font-size:2rem\\" data-id=\\"react-email-heading\\">Headings</h2><h3 style=\\"font-weight:500;padding-top:20px;font-size:1.75rem\\" data-id=\\"react-email-heading\\">Third-Level Heading</h3><h4 style=\\"font-weight:500;padding-top:20px;font-size:1.5rem\\" data-id=\\"react-email-heading\\">Fourth-Level Heading</h4><h5 style=\\"font-weight:500;padding-top:20px;font-size:1.25rem\\" data-id=\\"react-email-heading\\">Fifth-Level Heading</h5><h6 style=\\"font-weight:500;padding-top:20px;font-size:1rem\\" data-id=\\"react-email-heading\\">Sixth-Level Heading</h6><h2 style=\\"font-weight:500;padding-top:20px;font-size:2rem\\" data-id=\\"react-email-heading\\">Text Formatting</h2><p data-id=\\"react-email-text\\">This is some <strong style=\\"font-weight:bold\\">bold text</strong> and this is some <em style=\\"font-style:italic\\">italic text</em>. You can also use <del>strikethrough</del> and <code style=\\"color:#212529;font-size:87.5%;display:inline;background: #f8f8f8;font-family:SFMono-Regular,Menlo,Monaco,Consolas,monospace;word-wrap:break-word\\">inline code</code>.</p>
it("renders text in the correct format for browsers",()=>{
106
78
constactualOutput=render(
107
-
<MarkdownshowDataId>
79
+
<Markdown>
108
80
**This is sample bold text in markdown** and *this is italic text*
109
81
</Markdown>,
110
82
);
111
-
expect(actualOutput).toMatchInlineSnapshot(`
112
-
"<!DOCTYPE html PUBLIC \\"-//W3C//DTD XHTML 1.0 Transitional//EN\\" \\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\\"><div data-id=\\"react-email-markdown\\"><p data-id=\\"react-email-text\\"><strong style=\\"font-weight:bold\\">This is sample bold text in markdown</strong> and <em style=\\"font-style:italic\\">this is italic text</em></p>
113
-
</div>"
114
-
`);
83
+
expect(actualOutput).toMatchSnapshot();
115
84
});
116
85
117
86
it("renders links in the correct format for browsers",()=>{
118
87
constactualOutput=render(
119
-
<MarkdownshowDataId>
120
-
Link to [React-email](https://react.email)
121
-
</Markdown>,
88
+
<Markdown>Link to [React-email](https://react.email)</Markdown>,
122
89
);
123
-
expect(actualOutput).toMatchInlineSnapshot(`
124
-
"<!DOCTYPE html PUBLIC \\"-//W3C//DTD XHTML 1.0 Transitional//EN\\" \\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\\"><div data-id=\\"react-email-markdown\\"><p data-id=\\"react-email-text\\">Link to <a href=\\"https://react.email\\" target=\\"_blank\\" data-id=\\"react-email-link\\" style=\\"color:#007bff;text-decoration:underline;background-color:transparent\\">React-email</a></p>
125
-
</div>"
126
-
`);
90
+
expect(actualOutput).toMatchSnapshot();
127
91
});
128
92
129
93
it("renders lists in the correct format for browsers",()=>{
"<!DOCTYPE html PUBLIC \\"-//W3C//DTD XHTML 1.0 Transitional//EN\\" \\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\\"><div data-id=\\"react-email-markdown\\"><h1 style=\\"font-weight:500;padding-top:20px;font-size:2.5rem\\" data-id=\\"react-email-heading\\">Below is a list</h1><ul>
0 commit comments