diff --git a/src/__tests__/diff2html-tests.ts b/src/__tests__/diff2html-tests.ts index 12bb698..d9e4e8c 100644 --- a/src/__tests__/diff2html-tests.ts +++ b/src/__tests__/diff2html-tests.ts @@ -205,7 +205,7 @@ describe('Diff2Html', () => { it('should generate pretty line by line html from diff', () => { const result = html(diffExample1, { drawFileList: false }); expect(result).toMatchInlineSnapshot(` - "
+ "
@@ -262,7 +262,7 @@ describe('Diff2Html', () => { it('should generate pretty line by line html from json', () => { const result = html(jsonExample1, { drawFileList: false }); expect(result).toMatchInlineSnapshot(` - "
+ "
@@ -319,7 +319,7 @@ describe('Diff2Html', () => { it('should generate pretty diff with files summary', () => { const result = html(diffExample1, { drawFileList: true }); expect(result).toMatchInlineSnapshot(` - "
+ "
Files changed (1) hide @@ -339,7 +339,7 @@ describe('Diff2Html', () => { -
+
@@ -396,7 +396,7 @@ describe('Diff2Html', () => { it('should generate pretty side by side html from diff', () => { const result = html(diffExample1, { outputFormat: OutputFormatType.SIDE_BY_SIDE, drawFileList: false }); expect(result).toMatchInlineSnapshot(` - "
+ "
@@ -467,7 +467,7 @@ describe('Diff2Html', () => { it('should generate pretty side by side html from json', () => { const result = html(jsonExample1, { outputFormat: OutputFormatType.SIDE_BY_SIDE, drawFileList: false }); expect(result).toMatchInlineSnapshot(` - "
+ "
@@ -538,7 +538,7 @@ describe('Diff2Html', () => { it('should generate pretty side by side html from diff 2', () => { const result = html(diffExample1, { outputFormat: OutputFormatType.SIDE_BY_SIDE, drawFileList: true }); expect(result).toMatchInlineSnapshot(` - "
+ "
Files changed (1) hide @@ -558,7 +558,7 @@ describe('Diff2Html', () => { -
+
@@ -652,7 +652,7 @@ describe('Diff2Html', () => { ' \n'; const result = html(diffExample2, { drawFileList: false }); expect(result).toMatchInlineSnapshot(` - "
+ "
@@ -878,7 +878,7 @@ describe('Diff2Html', () => { const result = html(diff); expect(result).toMatchInlineSnapshot(` - "
+ "
Files changed (1) hide @@ -898,7 +898,7 @@ describe('Diff2Html', () => { -
+
@@ -980,7 +980,7 @@ describe('Diff2Html', () => { const result = html(diff); /* eslint-disable no-irregular-whitespace */ expect(result).toMatchInlineSnapshot(` - "
+ "
Files changed (1) hide @@ -1000,7 +1000,7 @@ describe('Diff2Html', () => { -
+
diff --git a/src/__tests__/file-list-renderer-tests.ts b/src/__tests__/file-list-renderer-tests.ts index 41a7cd5..52c703b 100644 --- a/src/__tests__/file-list-renderer-tests.ts +++ b/src/__tests__/file-list-renderer-tests.ts @@ -117,7 +117,7 @@ describe('FileListRenderer', () => { ]; const fileHtml = fileListRenderer.render(files); expect(fileHtml).toMatchInlineSnapshot(` - "
+ "
Files changed (4) hide diff --git a/src/__tests__/line-by-line-tests.ts b/src/__tests__/line-by-line-tests.ts index 4e1ae32..e8f5bff 100644 --- a/src/__tests__/line-by-line-tests.ts +++ b/src/__tests__/line-by-line-tests.ts @@ -449,7 +449,7 @@ describe('LineByLineRenderer', () => { }); const html = lineByLineRenderer.render(exampleJson); expect(html).toMatchInlineSnapshot(` - "
+ "
@@ -523,7 +523,7 @@ describe('LineByLineRenderer', () => { }); const html = lineByLineRenderer.render(exampleJson); expect(html).toMatchInlineSnapshot(` - "
+ "
@@ -583,7 +583,7 @@ describe('LineByLineRenderer', () => { const lineByLineRenderer = new LineByLineRenderer(hoganUtils); const html = lineByLineRenderer.render(exampleJson); expect(html).toMatchInlineSnapshot(` - "
+ "
diff --git a/src/__tests__/side-by-side-printer-tests.ts b/src/__tests__/side-by-side-printer-tests.ts index 681022e..ab886ab 100644 --- a/src/__tests__/side-by-side-printer-tests.ts +++ b/src/__tests__/side-by-side-printer-tests.ts @@ -278,7 +278,7 @@ describe('SideBySideRenderer', () => { const sideBySideRenderer = new SideBySideRenderer(hoganUtils, { matching: LineMatchingType.LINES }); const html = sideBySideRenderer.render(exampleJson); expect(html).toMatchInlineSnapshot(` - "
+ "
@@ -363,7 +363,7 @@ describe('SideBySideRenderer', () => { const sideBySideRenderer = new SideBySideRenderer(hoganUtils, {}); const html = sideBySideRenderer.render(exampleJson); expect(html).toMatchInlineSnapshot(` - "
+ "
@@ -434,7 +434,7 @@ describe('SideBySideRenderer', () => { const sideBySideRenderer = new SideBySideRenderer(hoganUtils); const html = sideBySideRenderer.render(exampleJson); expect(html).toMatchInlineSnapshot(` - "
+ "
diff --git a/src/render-utils.ts b/src/render-utils.ts index 2709525..f557796 100644 --- a/src/render-utils.ts +++ b/src/render-utils.ts @@ -89,11 +89,12 @@ export function toCSSClass(lineType: LineType): CSSLineClass { export function colorSchemeToCss(colorScheme: ColorSchemeType): string { switch (colorScheme) { case ColorSchemeType.DARK: - return ' d2h-dark-color-scheme'; + return 'd2h-dark-color-scheme'; case ColorSchemeType.AUTO: - return ' d2h-auto-color-scheme'; + return 'd2h-auto-color-scheme'; + case ColorSchemeType.LIGHT: default: - return ''; + return 'd2h-light-color-scheme'; } } diff --git a/src/templates/file-summary-wrapper.mustache b/src/templates/file-summary-wrapper.mustache index 600f4a3..e0cb897 100644 --- a/src/templates/file-summary-wrapper.mustache +++ b/src/templates/file-summary-wrapper.mustache @@ -1,4 +1,4 @@ -
+
Files changed ({{filesNumber}}) hide diff --git a/src/templates/generic-wrapper.mustache b/src/templates/generic-wrapper.mustache index 613723b..e186314 100644 --- a/src/templates/generic-wrapper.mustache +++ b/src/templates/generic-wrapper.mustache @@ -1,3 +1,3 @@ -
+
{{{content}}}