( line: string, isFirstOrLast: boolean, color: DiffOptionsColor, indicator: string, trailingSpaceFormatter: DiffOptionsColor, emptyFirstOrLastLinePlaceholder: string, )
| 17 | } |
| 18 | |
| 19 | function printDiffLine( |
| 20 | line: string, |
| 21 | isFirstOrLast: boolean, |
| 22 | color: DiffOptionsColor, |
| 23 | indicator: string, |
| 24 | trailingSpaceFormatter: DiffOptionsColor, |
| 25 | emptyFirstOrLastLinePlaceholder: string, |
| 26 | ): string { |
| 27 | return line.length !== 0 |
| 28 | ? color( |
| 29 | `${indicator} ${formatTrailingSpaces(line, trailingSpaceFormatter)}`, |
| 30 | ) |
| 31 | : indicator !== ' ' |
| 32 | ? color(indicator) |
| 33 | : isFirstOrLast && emptyFirstOrLastLinePlaceholder.length !== 0 |
| 34 | ? color(`${indicator} ${emptyFirstOrLastLinePlaceholder}`) |
| 35 | : '' |
| 36 | } |
| 37 | |
| 38 | function printDeleteLine( |
| 39 | line: string, |
no test coverage detected