Fixes the wrapTextNodes method to remove text nodes that consist exclusively of white space.