Skip to content

Commit 5ff72fd

Browse files
Normalize line endings when splitting file chunks
1 parent 11d5634 commit 5ff72fd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/filesystem/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ async function tailFile(filePath: string, numLines: number): Promise<string> {
378378
const chunkText = readData + remainingText;
379379

380380
// Split by newlines and count
381-
const chunkLines = chunkText.split('\n');
381+
const chunkLines = normalizeLineEndings(chunkText).split('\n');
382382

383383
// If this isn't the end of the file, the first line is likely incomplete
384384
// Save it to prepend to the next chunk

0 commit comments

Comments
 (0)