Skip to main content

word_level_changed_ranges

Function word_level_changed_ranges 

Source
pub fn word_level_changed_ranges(
    old: &str,
    new: &str,
) -> (WordChangedRanges, WordChangedRanges)
Expand description

Compute byte ranges in old/new that are not part of a common token subsequence.

Returns empty ranges when the lines are too dissimilar (or one side is blank) so pure inserts/deletes keep a clean full-width tint without chips.