fix: normalize line endings in file diffs (#1306)

Prevents CRLF-only changes from flooding diff view
Keeps text diffs focused on real content changes
This commit is contained in:
Bohdan Triapitsyn
2026-05-18 19:21:07 +03:00
parent 56a2319934
commit 81c834d194
+2 -2
View File
@@ -1752,8 +1752,8 @@ export async function getFileDiff(directory, { path: filePath, staged = false }
}
return {
original,
modified,
original: typeof original === 'string' ? original.replace(/\r\n/g, '\n') : original,
modified: typeof modified === 'string' ? modified.replace(/\r\n/g, '\n') : modified,
path: filePath,
isBinary: false,
};