(text: string)
| 41 | |
| 42 | const normalizeLineEndings = (text: string) => text.replaceAll("\r\n", "\n") |
| 43 | const detectLineEnding = (text: string): "\n" | "\r\n" => (text.includes("\r\n") ? "\r\n" : "\n") |
| 44 | const convertToLineEnding = (text: string, ending: "\n" | "\r\n") => |
| 45 | ending === "\n" ? normalizeLineEndings(text) : normalizeLineEndings(text).replaceAll("\n", "\r\n") |
| 46 |