Only cleanup whitespace if the buffer was clean