Fix diff rendering in windows. (#7254)

This commit is contained in:
Tommaso Sciortino 2025-08-27 15:22:55 -07:00 committed by GitHub
parent cd2e237c73
commit af4fe611ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 13 deletions

View file

@ -6,7 +6,6 @@
import type React from 'react';
import { Box, Text } from 'ink';
import { EOL } from 'node:os';
import { Colors } from '../../colors.js';
import crypto from 'node:crypto';
import { colorizeCode, colorizeLine } from '../../utils/CodeColorizer.js';
@ -21,7 +20,7 @@ interface DiffLine {
}
function parseDiffWithLineNumbers(diffContent: string): DiffLine[] {
const lines = diffContent.split(EOL);
const lines = diffContent.split('\n');
const result: DiffLine[] = [];
let currentOldLine = 0;
let currentNewLine = 0;