Browse Source

Revert "Address some logic issues in the HTML parser"

This reverts commit b5926fdb12.
pull/5719/head
Brian Ernesto 2 years ago
parent
commit
4e9d5c9319
  1. 3
      src/parser/model/ParserHtml.ts

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

Loading…
Cancel
Save