Resolve #1004 and #1054 due to #962

This commit is contained in:
the-djmaze 2023-03-28 13:13:44 +02:00
parent 78e294e98e
commit 564afd96f2

View file

@ -282,7 +282,8 @@ const
// Recursively examine container nodes and wrap any inline children.
fixContainer = (container, root) => {
let wrapper, isBR;
[...container.children].forEach(child => {
// Not live, and fast
[...container.childNodes].forEach(child => {
isBR = child.nodeName === 'BR';
if (!isBR && isInline(child)
// && (blockTag !== 'DIV' || (child.matches && !child.matches(phrasingElements)))