normalize_line_fix

Function normalize_line_fix 

Source
pub fn normalize_line_fix(
    fix: &Fix,
    content: &str,
    line_starts: &[usize],
) -> Option<Fix>
Expand description

Convert a line-based Fix into an offset-based one using precomputed line starts.

Line-based fixes (created via deprecated Fix::replace, Fix::delete, etc.) are normalized to Fix::replace_range using the provided line_starts offsets.

Returns None if the fix references an out-of-range line or the old_text is not found.