|| (eol === '\n' && (this._cr > 0 || this._crlf > 0)))
) {
for (let i = 0, len = chunks.length; i < len; i++) {
const str = chunks[i].buffer.replace(/\r\n|\r|\n/g, eol);
const newLineStart = createLineStartsFast(str);
chunks[i] = new StringBuffer(str, newLineStart);
}
}
const textBuffer = new PieceTreeTextBuffer(chunks, this._bom, eol, this._containsRTL, this._containsUnusualLineTerminators, this._isBasicASCII, this._normalizeEOL);