Skip to main content

changed_lines

Function changed_lines 

Source
pub fn changed_lines(before: &str, after: &str) -> Vec<Range<usize>>
Expand description

The line ranges of after the mend touched, by a line diff: identical texts give none, a one-word fix gives that line alone, lines added give their run, and lines deleted give an empty range where they were. Spaces at a line’s end do not count as a change.