(line: string)
| 156 | } |
| 157 | |
| 158 | function getShikiDiffKind(line: string): "add" | "remove" | null { |
| 159 | if (SHIKI_ADD_RE.test(line)) return "add"; |
| 160 | if (SHIKI_REMOVE_RE.test(line)) return "remove"; |
| 161 | return null; |
| 162 | } |
| 163 | |
| 164 | function classifyUnifiedDiffLine(line: string): FileEditDiffLine { |
| 165 | if (/^(diff --git|--- |\+\+\+ |@@)/.test(line)) { |