Expand description
Unified diff generation with color support.
This module provides utilities for generating standard unified diff format output, detecting when to use colors (respecting NO_COLOR and TTY detection), and applying colors to deletions/additions following git’s convention (red for removed, green for added).
Functions§
- format_
colored_ diff - Formats a colored diff between two strings.
- format_
diff_ summary - Generates a git-style summary header for a diff.
- format_
unified_ diff - Generates a unified diff between two strings.
- should_
use_ color - Determines whether colored output should be used.