Skip to main content

annotate

Function annotate 

Source
pub fn annotate(content: &str, start_line: usize) -> String
Expand description

Render content as anchored lines N:hh|text, numbering from start_line (1-based). Pure function of (content, start_line) for determinism (#498).

The returned string has no trailing newline, so callers control framing. Note: line splitting follows str::lines (a trailing newline does not yield an extra empty line), matching how the rest of ctx_read counts lines.