react-email
Advanced tools
+6
-0
| # react-email | ||
| ## 6.3.2 | ||
| ### Patch Changes | ||
| - fbda5c8: increase whitespace padding to 200 characters for better Gmail preview text rendering | ||
| ## 6.3.1 | ||
@@ -4,0 +10,0 @@ |
+1
-1
| { | ||
| "name": "react-email", | ||
| "version": "6.3.1", | ||
| "version": "6.3.2", | ||
| "description": "A live preview of your emails right in your browser.", | ||
@@ -5,0 +5,0 @@ "bin": { |
@@ -8,3 +8,3 @@ import { render } from '@react-email/render'; | ||
| expect(actualOutput).toMatchInlineSnapshot( | ||
| `"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><!--$--><div style="display:none;overflow:hidden;line-height:1px;opacity:0;max-height:0;max-width:0" data-skip-in-text="true">Email preview text<div> </div></div><!--/$-->"`, | ||
| `"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><!--$--><div style="display:none;overflow:hidden;line-height:1px;opacity:0;max-height:0;max-width:0" data-skip-in-text="true">Email preview text<div> </div></div><!--/$-->"`, | ||
| ); | ||
@@ -18,3 +18,3 @@ }); | ||
| expect(actualOutputArray).toMatchInlineSnapshot( | ||
| `"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><!--$--><div style="display:none;overflow:hidden;line-height:1px;opacity:0;max-height:0;max-width:0" data-skip-in-text="true">Email preview text<div> </div></div><!--/$-->"`, | ||
| `"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><!--$--><div style="display:none;overflow:hidden;line-height:1px;opacity:0;max-height:0;max-width:0" data-skip-in-text="true">Email preview text<div> </div></div><!--/$-->"`, | ||
| ); | ||
@@ -27,3 +27,3 @@ }); | ||
| expect(actualOutputLong).toMatchInlineSnapshot( | ||
| `"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><!--$--><div style="display:none;overflow:hidden;line-height:1px;opacity:0;max-height:0;max-width:0" data-skip-in-text="true">really longreally longreally longreally longreally longreally longreally longreally longreally longreally longreally longreally longreally longreally </div><!--/$-->"`, | ||
| `"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><!--$--><div style="display:none;overflow:hidden;line-height:1px;opacity:0;max-height:0;max-width:0" data-skip-in-text="true">really longreally longreally longreally longreally longreally longreally longreally longreally longreally longreally longreally longreally longreally longreally longreally longreally longreally longre</div><!--/$-->"`, | ||
| ); | ||
@@ -34,5 +34,5 @@ }); | ||
| describe('renderWhiteSpace', () => { | ||
| it('renders null when text length is greater than or equal to PREVIEW_MAX_LENGTH (150)', () => { | ||
| it('renders null when text length is greater than or equal to PREVIEW_MAX_LENGTH (200)', () => { | ||
| const text = | ||
| 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Tenetur dolore mollitia dignissimos itaque. At excepturi reiciendis iure molestias incidunt. Ab saepe, nostrum dicta dolor maiores tenetur eveniet odio amet ipsum?'; | ||
| 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Tenetur dolore mollitia dignissimos itaque. At excepturi reiciendis iure molestias incidunt. Ab saepe, nostrum dicta dolor maiores tenetur eveniet odio amet ipsum? Lorem ipsum extra.'; | ||
| const html = renderWhiteSpace(text); | ||
@@ -50,5 +50,5 @@ expect(html).toBeNull(); | ||
| const actualTextContent = html?.props.children; | ||
| const expectedTextContent = whiteSpaceCharacters.repeat(150 - text.length); | ||
| const expectedTextContent = whiteSpaceCharacters.repeat(200 - text.length); | ||
| expect(actualTextContent).toBe(expectedTextContent); | ||
| }); | ||
| }); |
@@ -9,3 +9,3 @@ import * as React from 'react'; | ||
| const PREVIEW_MAX_LENGTH = 150; | ||
| const PREVIEW_MAX_LENGTH = 200; | ||
@@ -12,0 +12,0 @@ export const Preview = React.forwardRef<HTMLDivElement, PreviewProps>( |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
4707567
0.05%121089
0.01%