fn byte_offset_to_line(source: &str, offset: usize) -> usize
Convert a byte offset in source text to a 1-based line number.