Skip to main content

Module git_diff

Module git_diff 

Source
Expand description

Git-diff (markdown) surface: a unified text diff plus a parse-diff-style AST, BOTH derived from the same similar op stream so they can never disagree. There is no parse-diff crate in Rust; the AST is synthesized directly from similar’s DiffOp/ChangeTag stream.

Structs§

GitDiff
Output of a git-diff computation: the unified text surface and the typed AST. Both come from one op stream over the same normalized inputs.

Functions§

compute
Compute the unified text + AST between two already-normalized markdown strings. max_changes caps the number of AST change-lines; on overflow the AST is marked truncated (the full snapshot is retained by the caller, so the change is recoverable). The text surface is always complete.