pub fn compute_line_diff(
old_content: &[u8],
new_content: &[u8],
options: &DiffOptions,
) -> Result<Vec<DiffHunk>>Expand description
Compute line-level diff between two text contents
This function implements a simple line-based diff algorithm that:
- Splits both texts into lines
- Finds the longest common subsequence (LCS)
- Generates hunks with context lines
§Arguments
old_content- Content from the source versionnew_content- Content from the target versionoptions- Options controlling diff generation
§Returns
Returns a vector of DiffHunk representing the changes