diff --git a/packages/strings/src/split.ts b/packages/strings/src/split.ts index 657a11ac2e..de4efc39b6 100644 --- a/packages/strings/src/split.ts +++ b/packages/strings/src/split.ts @@ -12,11 +12,7 @@ * @param delim * @param includeDelim */ -export function* split( - src: string, - delim = /(\r\n)|\n|\r/g, - includeDelim = false -) { +export function* split(src: string, delim = /\r?\n/g, includeDelim = false) { let i = 0; const n = src.length; const include = ~~includeDelim;