Skip to content

Commit 35008fb

Browse files
authored
Merge pull request #457 from rtfpessoa/fix-side-by-side-margins-highlight-overrides
fix side by side margins and highlight usage of object instead of map
2 parents 59ff295 + 5ca9d22 commit 35008fb

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/ui/css/diff2html.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,6 @@
113113
overflow-x: scroll;
114114
overflow-y: hidden;
115115
width: 50%;
116-
margin-right: -4px;
117-
margin-bottom: -8px;
118116
}
119117

120118
.d2h-code-line {

src/ui/js/diff2html-ui-base.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ export class Diff2HtmlUI {
146146

147147
const language = file.getAttribute('data-lang');
148148

149+
if (!(this.config.highlightLanguages instanceof Map)) {
150+
this.config.highlightLanguages = new Map(Object.entries(this.config.highlightLanguages));
151+
}
152+
149153
const hljsLanguage =
150154
language && this.config.highlightLanguages.has(language)
151155
? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion

0 commit comments

Comments
 (0)