Skip to main content

get_match_context

Function get_match_context 

Source
pub fn get_match_context(
    chunk: &CodeChunk,
    matched_lines: &[usize],
    context_lines: usize,
) -> Vec<(usize, String, bool)>
Expand description

Get context lines around matched lines.

Returns a list of (line_number, line_content, is_match) tuples.