(hunkLines: string[])
| 29 | } |
| 30 | |
| 31 | function extractBeforeLines(hunkLines: string[]): string[] { |
| 32 | return hunkLines |
| 33 | .filter((line) => line.startsWith("-") || !line.startsWith("+")) |
| 34 | .map((line) => line.substring(1)); |
| 35 | } |
| 36 | |
| 37 | /** |
| 38 | * Applies a unified diff to source code and returns an array of DiffLine objects. |