Imported collapseWhitespace