Normalize line endings when splitting file chunks
This commit is contained in:
parent
db24c89c5e
commit
f41565ce83
1 changed files with 1 additions and 1 deletions
|
|
@ -378,7 +378,7 @@ async function tailFile(filePath: string, numLines: number): Promise<string> {
|
||||||
const chunkText = readData + remainingText;
|
const chunkText = readData + remainingText;
|
||||||
|
|
||||||
// Split by newlines and count
|
// Split by newlines and count
|
||||||
const chunkLines = chunkText.split('\n');
|
const chunkLines = normalizeLineEndings(chunkText).split('\n');
|
||||||
|
|
||||||
// If this isn't the end of the file, the first line is likely incomplete
|
// If this isn't the end of the file, the first line is likely incomplete
|
||||||
// Save it to prepend to the next chunk
|
// Save it to prepend to the next chunk
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue