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; } }