(file: DiffFile, diffs: FileHtml)
| 60 | } |
| 61 | |
| 62 | makeFileDiffHtml(file: DiffFile, diffs: FileHtml): string { |
| 63 | if (this.config.renderNothingWhenEmpty && Array.isArray(file.blocks) && file.blocks.length === 0) return ''; |
| 64 | |
| 65 | const fileDiffTemplate = this.hoganUtils.template(baseTemplatesPath, 'file-diff'); |
| 66 | const filePathTemplate = this.hoganUtils.template(genericTemplatesPath, 'file-path'); |
| 67 | const fileIconTemplate = this.hoganUtils.template(iconsBaseTemplatesPath, 'file'); |
| 68 | const fileTagTemplate = this.hoganUtils.template(tagsBaseTemplatesPath, renderUtils.getFileIcon(file)); |
| 69 | |
| 70 | return fileDiffTemplate.render({ |
| 71 | file: file, |
| 72 | fileHtmlId: renderUtils.getHtmlId(file), |
| 73 | diffs: diffs, |
| 74 | filePath: filePathTemplate.render( |
| 75 | { |
| 76 | fileDiffName: renderUtils.filenameDiff(file), |
| 77 | }, |
| 78 | { |
| 79 | fileIcon: fileIconTemplate, |
| 80 | fileTag: fileTagTemplate, |
| 81 | }, |
| 82 | ), |
| 83 | }); |
| 84 | } |
| 85 | |
| 86 | generateEmptyDiff(): FileHtml { |
| 87 | return { |
no test coverage detected