Skip to main content

build_compact_diff_preview

Function build_compact_diff_preview 

Source
pub fn build_compact_diff_preview(
    before: &str,
    after: &str,
    opts: &CompactDiffOptions,
) -> CompactDiffPreview
Expand description

Build a compact before/after diff preview. Added and context (unchanged) lines are numbered at their post-edit positions; unchanged lines far from any change are trimmed to CompactDiffOptions::max_unchanged_context lines on each side; long added runs are collapsed with a marker.