MCPcopy Index your code
hub / github.com/rtfpessoa/diff2html / render

Method render

src/file-list-renderer.ts:25–51  ·  view source on GitHub ↗
(diffFiles: DiffFile[])

Source from the content-addressed store, hash-verified

23 }
24
25 render(diffFiles: DiffFile[]): string {
26 const files = diffFiles
27 .map(file =>
28 this.hoganUtils.render(
29 baseTemplatesPath,
30 'line',
31 {
32 fileHtmlId: renderUtils.getHtmlId(file),
33 oldName: file.oldName,
34 newName: file.newName,
35 fileName: renderUtils.filenameDiff(file),
36 deletedLines: '-' + file.deletedLines,
37 addedLines: '+' + file.addedLines,
38 },
39 {
40 fileIcon: this.hoganUtils.template(iconsBaseTemplatesPath, renderUtils.getFileIcon(file)),
41 },
42 ),
43 )
44 .join('\n');
45
46 return this.hoganUtils.render(baseTemplatesPath, 'wrapper', {
47 colorScheme: renderUtils.colorSchemeToCss(this.config.colorScheme),
48 filesNumber: diffFiles.length,
49 files: files,
50 });
51 }
52}

Callers

nothing calls this directly

Calls 1

templateMethod · 0.80

Tested by

no test coverage detected