Skip to main content

Module diff

Module diff 

Source

Structs§

DiffColors
ANSI colour constants for diff rendering.
DiffLine
One line of a diff.
ParsedDiff
A parsed diff with optional file header and hunks.

Enums§

DiffLineKind
A single line in a diff hunk with its kind.

Functions§

format_diff
One-shot: parse a unified diff string and render it with colours.
parse
Parse a unified diff string into structured lines.
render
Render a parsed diff to ANSI-coloured terminal text.