keep nodes in HTML templates
This commit is contained in:
parent
57111e51fc
commit
8473053d79
|
@ -90,7 +90,7 @@ Object.assign(t, {
|
|||
const toRemove = [];
|
||||
while (walker.nextNode()) {
|
||||
const textNode = walker.currentNode;
|
||||
if (!textNode.nodeValue.trim()) {
|
||||
if (!/[\xA0\S]/.test(textNode.nodeValue)) { // allow \xA0 to keep
|
||||
toRemove.push(textNode);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user