Collapse repeated spaces automatically