(
raw: {
changes: RawChange[]
oldStart: number
oldLines: number
newStart: number
newLines: number
content: string
},
options: ParseOptions,
)
| 295 | } |
| 296 | |
| 297 | function processHunk( |
| 298 | raw: { |
| 299 | changes: RawChange[] |
| 300 | oldStart: number |
| 301 | oldLines: number |
| 302 | newStart: number |
| 303 | newLines: number |
| 304 | content: string |
| 305 | }, |
| 306 | options: ParseOptions, |
| 307 | ): DiffHunk { |
| 308 | const lines = options.mergeModifiedLines |
| 309 | ? mergeAdjacentLines(raw.changes, options) |
| 310 | : raw.changes.map(changeToLine) |
| 311 | |
| 312 | return { |
| 313 | type: 'hunk', |
| 314 | content: raw.content, |
| 315 | oldStart: raw.oldStart, |
| 316 | oldLines: raw.oldLines, |
| 317 | newStart: raw.newStart, |
| 318 | newLines: raw.newLines, |
| 319 | lines, |
| 320 | } |
| 321 | } |
| 322 | |
| 323 | export function insertSkipBlocks(hunks: DiffHunk[]): (DiffHunk | DiffSkipBlock)[] { |
| 324 | const result: (DiffHunk | DiffSkipBlock)[] = [] |
no test coverage detected