put unnecessary trailing whitespaces before newlines back in