Fix check for isOmnivoreNode

This commit is contained in:
Jackson Harper 2022-11-01 10:52:29 +08:00
parent e1d7eeed01
commit 9b53b09d51

View file

@ -602,7 +602,7 @@ Readability.prototype = {
continue;
}
if (node.parentNode && ["DIV", "SECTION"].includes(node.tagName) && !(node.id && node.id.startsWith("readability") && !this._isOmnivoreNode(node)) {
if (node.parentNode && ["DIV", "SECTION"].includes(node.tagName) && !this._isOmnivoreNode(node) && !(node.id && node.id.startsWith("readability"))) {
if (this._isElementWithoutContent(node)) {
node = this._removeAndGetNext(node);
continue;