UNPKG

sdf-parser

Version:
16 lines 721 B
/** * Normalise CRLF sequences in `chunk` to LF. Lone `\r` (old Mac OS 9 line * endings, pre-2001) is not supported and passes through unchanged. * * A `\r` at the very end of a chunk is held in `state.pendingCR` so that a * `\r\n` pair split across a chunk boundary is still collapsed to a single * `\n`. * @param chunk - The incoming text chunk to normalise. * @param state - Mutable state shared between chunk invocations. * @param state.pendingCR - Whether a `\r` was held over from the previous chunk. * @returns The chunk with CRLF sequences replaced by LF. */ export declare function normaliseChunk(chunk: string, state: { pendingCR: boolean; }): string; //# sourceMappingURL=normaliseChunk.d.ts.map