fix side by side margins and highlight usage of object instead of map
This commit is contained in:
parent
59ff2956ab
commit
5ca9d22276
2 changed files with 4 additions and 2 deletions
|
|
@ -113,8 +113,6 @@
|
|||
overflow-x: scroll;
|
||||
overflow-y: hidden;
|
||||
width: 50%;
|
||||
margin-right: -4px;
|
||||
margin-bottom: -8px;
|
||||
}
|
||||
|
||||
.d2h-code-line {
|
||||
|
|
|
|||
|
|
@ -146,6 +146,10 @@ export class Diff2HtmlUI {
|
|||
|
||||
const language = file.getAttribute('data-lang');
|
||||
|
||||
if (!(this.config.highlightLanguages instanceof Map)) {
|
||||
this.config.highlightLanguages = new Map(Object.entries(this.config.highlightLanguages));
|
||||
}
|
||||
|
||||
const hljsLanguage =
|
||||
language && this.config.highlightLanguages.has(language)
|
||||
? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
|
|
|
|||
Loading…
Reference in a new issue