Skip to main content

compute_diff

Function compute_diff 

Source
pub fn compute_diff(old: &ContentSnapshot, new: &ContentSnapshot) -> ContentDiff
Expand description

Compute a paragraph-level semantic diff between two snapshots.

Uses an LCS-based algorithm on normalised paragraph fingerprints to find unchanged regions; everything outside is classified as added, removed, or modified (same position, different text).