MCPcopy Create free account
hub / github.com/ChromeDevTools/devtools-frontend / createRow

Function createRow

front_end/ui/components/diff_view/DiffView.ts:166–179  ·  view source on GitHub ↗
(text: string, type: RowType)

Source from the content-addressed store, hash-verified

164 }
165
166 function createRow(text: string, type: RowType): Row {
167 if (type === RowType.ADDITION) {
168 currentLineNumber++;
169 }
170 if (type === RowType.DELETION) {
171 originalLineNumber++;
172 }
173 if (type === RowType.EQUAL) {
174 originalLineNumber++;
175 currentLineNumber++;
176 }
177
178 return {originalLineNumber, currentLineNumber, tokens: text ? [{text, className: 'inner-diff'}] : [], type};
179 }
180}
181
182function documentMap(lines: readonly string[]): Map<number, number> {

Callers 3

buildDiffRowsFunction · 0.70
createEqualRowsFunction · 0.70
createModifyRowsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected