From 4e9d5c931908fad502e9b1663fce7c56d5155ad6 Mon Sep 17 00:00:00 2001 From: Brian Ernesto Date: Thu, 7 Mar 2024 18:40:40 -0700 Subject: [PATCH] Revert "Address some logic issues in the HTML parser" This reverts commit b5926fdb1298b66a1d5cc705c39f0eb5da8021d5. --- src/parser/model/ParserHtml.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/parser/model/ParserHtml.ts b/src/parser/model/ParserHtml.ts index 4f09aba1b..42482c27a 100644 --- a/src/parser/model/ParserHtml.ts +++ b/src/parser/model/ParserHtml.ts @@ -245,8 +245,7 @@ const ParserHtml = (em?: EditorModel, config: ParserConfig & { returnArray?: boo // Throw away empty nodes (keep spaces) if (!opts.keepEmptyTextNodes) { const content = node.nodeValue; - // Handle all white spaces. This checks for tabs, newlines, and multiple spaces - if (content!.length > 0 && content!.trim() !== '') { + if (content != ' ' && !content!.trim()) { continue; } }