Support input with empty lines.