Fix eslint issues.

pull/581/head
Gijs 4 years ago
parent 7c91bdd275
commit 56ecc4d4ba

@ -338,12 +338,12 @@ Readability.prototype = {
// if the link only contains simple text content, it can be converted to a text node
if (link.childNodes.length === 1 && link.childNodes[0].nodeType === this.TEXT_NODE) {
var text = this._doc.createTextNode(link.textContent);
link.parentNode.replaceChild(text, link);
link.parentNode.replaceChild(text, link);
} else {
// if the link has multiple children, they should all be preserved
var container = this._doc.createElement('span')
var container = this._doc.createElement("span");
while (link.childNodes.length > 0) {
container.appendChild(link.childNodes[0])
container.appendChild(link.childNodes[0]);
}
link.parentNode.replaceChild(container, link);
}

Loading…
Cancel
Save