(content: string)
| 398 | } |
| 399 | |
| 400 | function fileLines(content: string): string[] { |
| 401 | if (content.length === 0) return []; |
| 402 | const normalized = content.replace(/\r\n/g, "\n"); |
| 403 | const lines = normalized.split("\n"); |
| 404 | if (normalized.endsWith("\n")) lines.pop(); |
| 405 | return lines; |
| 406 | } |
| 407 | |
| 408 | function hunkRange(start: number, count: number): string { |
| 409 | return count === 0 ? "0,0" : `${start},${count}`; |