Ask a question to get started
Enter to send•Shift+Enter new line
Compute a unified diff between before and after content.
compute_unified_diff( before: str, after: str, display_path: str, *, max_lines: int | None = 800, context_lines: int = 3 ) -> str | None
before
str
Original content
after
New content
display_path
Path for display in diff headers
max_lines
int | None
800
Maximum number of diff lines (None for unlimited)
context_lines
int
3
Number of context lines around changes (default 3)