fn is_valid_linebreak(input: &[&str], pos: usize) -> bool