(in map[string]any)
| 1610 | return strings.Join(lines, "\n") |
| 1611 | } |
| 1612 | |
| 1613 | func ComputeEditDiffStat(oldContent, newContent string) (int, int) { |
| 1614 | oldCount := editLineCount(oldContent) |
| 1615 | newCount := editLineCount(newContent) |
| 1616 | if oldCount != newCount { |
| 1617 | return max(0, oldCount-newCount), max(0, newCount-oldCount) |
| 1618 | } |
| 1619 | return oldCount, newCount |
| 1620 | } |
| 1621 | |
| 1622 | func editLineCount(content string) int { |
| 1623 | if content == "" { |
| 1624 | return 0 |