Clamp diffs lines after merging

This commit is contained in:
Silvano Cerza 2025-02-21 18:40:17 +01:00
parent bca72c4938
commit 64d0223aa0

View file

@ -87,10 +87,8 @@ function diff(oldText: string, newText: string): DiffChunk[] {
}
}
return mergeDiffs(
result.map((chunk) =>
clampChunkLines(chunk, oldLines.length, newLines.length),
),
return mergeDiffs(result).map((chunk) =>
clampChunkLines(chunk, oldLines.length, newLines.length),
);
}