(text: string)
| 31 | |
| 32 | /** Parse the line ending string into an enum value (or `null` if unknown) */ |
| 33 | export 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 |
no outgoing calls
no test coverage detected