(node)
| 390 | } |
| 391 | |
| 392 | isInsignificantTextNode(node) { |
| 393 | if (node?.nodeType !== Node.TEXT_NODE) return |
| 394 | if (!stringIsAllBreakableWhitespace(node.data)) return |
| 395 | const { parentNode, previousSibling, nextSibling } = node |
| 396 | if (nodeEndsWithNonWhitespace(parentNode.previousSibling) && !this.isBlockElement(parentNode.previousSibling)) return |
| 397 | if (elementCanDisplayPreformattedText(parentNode)) return |
| 398 | return !previousSibling || this.isBlockElement(previousSibling) || !nextSibling || this.isBlockElement(nextSibling) |
| 399 | } |
| 400 | |
| 401 | isExtraBR(element) { |
| 402 | return tagName(element) === "br" && this.isBlockElement(element.parentNode) && element.parentNode.lastChild === element |
no test coverage detected