From 0a766d73148aad3c8b59e185885942e873f52628 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Mon, 6 May 2024 11:28:13 +0100 Subject: [PATCH] Desktop: Fixed an issue that could cause certain notes not to render when they contain an empty STYLE tag --- packages/renderer/HtmlToHtml.test.ts | 13 +++++++++++++ packages/renderer/HtmlToHtml.ts | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/renderer/HtmlToHtml.test.ts b/packages/renderer/HtmlToHtml.test.ts index 6f0e1648bb..6db71e9846 100644 --- a/packages/renderer/HtmlToHtml.test.ts +++ b/packages/renderer/HtmlToHtml.test.ts @@ -32,6 +32,19 @@ describe('HtmlToHtml', () => { css: '', }, ], + // cSpell:disable + [ + ` +




-------- Message transféré --------
Sujet : +Your car rental booking DC-7706328 is confirmed (pick-up on 1 October 2024)
`, + { + html: ` +




-------- Message transféré --------
Sujet : +Your car rental booking DC-7706328 is confirmed (pick-up on 1 October 2024)
`, + css: '', + }, + ], + // cSpell:enable ]; for (const t of testCases) { diff --git a/packages/renderer/HtmlToHtml.ts b/packages/renderer/HtmlToHtml.ts index abd4d99ed0..d5ba506318 100644 --- a/packages/renderer/HtmlToHtml.ts +++ b/packages/renderer/HtmlToHtml.ts @@ -180,7 +180,7 @@ export default class HtmlToHtml implements MarkupRenderer { } } -const splitHtmlRegex = /^