When traversing the HTML structure the to-be-removed nodes in the middle of the text could prevent correct move between nodes, by traversing into them and immediately removing the node.
When traversing the HTML structure the to-be-removed nodes in the middle of the text could prevent correct move between nodes, by traversing into them and immediately removing the node.