Skip to main content

compute_edit_diff_from_path

Function compute_edit_diff_from_path 

Source
pub fn compute_edit_diff_from_path(
    path: &str,
    old_str: &str,
    new_str: &str,
) -> String
Expand description

Compute a diff for an edit operation and return it as a plain-text string (no ANSI codes). Reads the current file content to locate the edit.