Merge pull request #214 from Shchvova/fixing-for-windows

Fixing for windows terminal forcing \r\n
This commit is contained in:
Justin Spahr-Summers 2025-04-07 11:10:40 +01:00 • committed by GitHub
commit 4b69f40005
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -20,7 +20,7 @@ export class ReadBuffer {
return null;
}
const line = this._buffer.toString("utf8", 0, index);
const line = this._buffer.toString("utf8", 0, index).replace(/\r$/, '');
this._buffer = this._buffer.subarray(index + 1);
return deserializeMessage(line);
}