Automatically infer whether input is multiline or not.