MCPcopy Index your code
hub / github.com/desktop/desktop / parseLineEndingText

Function parseLineEndingText

app/src/models/diff/diff-data.ts:33–45  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

31
32/** Parse the line ending string into an enum value (or `null` if unknown) */
33export function parseLineEndingText(text: string): LineEnding | null {
34 const input = text.trim()
35 switch (input) {
36 case 'CR':
37 return 'CR'
38 case 'LF':
39 return 'LF'
40 case 'CRLF':
41 return 'CRLF'
42 default:
43 return null
44 }
45}
46
47/**
48 * Data returned as part of a textual diff from Desktop

Callers 1

parseLineEndingsWarningFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected