Skip to main content

render_diff_plain

Function render_diff_plain 

Source
pub fn render_diff_plain(
    old_lines: &[&str],
    new_lines: &[&str],
    diff: &[DiffLine<'_>],
    show_line_numbers: bool,
) -> String
Expand description

Render a DiffLine sequence into a plain-text string (no ANSI codes).

Returns a string with lines prefixed by (keep), - (remove), or + (add), and line numbers if requested.