Comparing version 0.2.6 to 0.2.7
@@ -85,2 +85,3 @@ "use strict"; | ||
this._registry = new vscode_textmate_1.Registry(this._resolver); | ||
repairThemeIfNoFallbackColor(theme); | ||
this._registry.setTheme(theme); | ||
@@ -156,2 +157,15 @@ this._theme = theme; | ||
} | ||
function repairThemeIfNoFallbackColor(theme) { | ||
// Has the default no-scope setting with fallback colors | ||
if (theme.settings[0].settings && !theme.settings[0].scope) { | ||
return; | ||
} | ||
// Push a no-scope setting with fallback colors | ||
theme.settings.unshift({ | ||
settings: { | ||
foreground: theme.fg, | ||
background: theme.bg | ||
} | ||
}); | ||
} | ||
//# sourceMappingURL=highlighter.js.map |
{ | ||
"name": "shiki", | ||
"version": "0.2.6", | ||
"version": "0.2.7", | ||
"description": "shiki", | ||
@@ -21,7 +21,7 @@ "keywords": [ | ||
"onigasm": "^2.2.5", | ||
"shiki-languages": "^0.2.6", | ||
"shiki-themes": "^0.2.6", | ||
"shiki-languages": "^0.2.7", | ||
"shiki-themes": "^0.2.7", | ||
"vscode-textmate": "^5.2.0" | ||
}, | ||
"gitHead": "4a0dd37dc6980d1c5d13580e5166c67d0027211d" | ||
"gitHead": "c11ea269bc8cf9acc87506c3ec510a597f12b3e0" | ||
} |
@@ -57,2 +57,3 @@ import { Registry } from 'vscode-textmate' | ||
repairThemeIfNoFallbackColor(theme) | ||
this._registry.setTheme(theme) | ||
@@ -134,1 +135,16 @@ | ||
} | ||
function repairThemeIfNoFallbackColor(theme: IShikiTheme) { | ||
// Has the default no-scope setting with fallback colors | ||
if (theme.settings[0].settings && !theme.settings[0].scope) { | ||
return | ||
} | ||
// Push a no-scope setting with fallback colors | ||
theme.settings.unshift({ | ||
settings: { | ||
foreground: theme.fg, | ||
background: theme.bg | ||
} | ||
}) | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3
276476
50
2314
Updatedshiki-languages@^0.2.7
Updatedshiki-themes@^0.2.7