handle repeated newlines when deleting