fix: Ignore html comment elements
This commit is contained in:
@@ -516,7 +516,7 @@ export class Translator {
|
|||||||
}
|
}
|
||||||
text += `[${keeps.length}]`;
|
text += `[${keeps.length}]`;
|
||||||
keeps.push(child.outerHTML);
|
keeps.push(child.outerHTML);
|
||||||
} else {
|
} else if (child.nodeType === 1 || child.nodeType === 3) {
|
||||||
text += child.textContent;
|
text += child.textContent;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user