fn count_lines(fragment: &str) -> usize {
    fragment.chars().filter(|c| *c == '\n').count() + 1
}
Given a string, calculates the 1 indexed line number of the line on which
the final character of the string appears
doc-chunks/src/developer.rs