Fix DOMfilter when replacing multiple occasions
Previously, it would sometimes forget things at the end
This commit is contained in:
parent
1478b611da
commit
8a740b765a
1 changed files with 4 additions and 2 deletions
|
@ -94,13 +94,15 @@ weechat.filter('DOMfilter', ['$filter', '$sce', function($filter, $sce) {
|
|||
} else {
|
||||
parent.appendChild(newNode);
|
||||
}
|
||||
return newNode;
|
||||
}
|
||||
}
|
||||
// recurse
|
||||
if (node === undefined || node === null) return;
|
||||
node = node.firstChild;
|
||||
while (node) {
|
||||
process(node);
|
||||
node = node.nextSibling;
|
||||
var nextNode = process(node);
|
||||
node = (nextNode ? nextNode : node).nextSibling;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue