(line: string, isCombined: boolean, escape = true)
| 124 | * Deconstructs diff @line by separating the content from the prefix type |
| 125 | */ |
| 126 | export function deconstructLine(line: string, isCombined: boolean, escape = true): DiffLineParts { |
| 127 | const indexToSplit = prefixLength(isCombined); |
| 128 | return { |
| 129 | prefix: line.substring(0, indexToSplit), |
| 130 | content: escape ? escapeForHtml(line.substring(indexToSplit)) : line.substring(indexToSplit), |
| 131 | }; |
| 132 | } |
| 133 | |
| 134 | /** |
| 135 | * Generates pretty filename diffs |
no test coverage detected
searching dependent graphs…