mirror of
https://github.com/zadam/trilium.git
synced 2026-01-03 21:24:24 +01:00
feat(client/print): enforce VS code theme when printing code notes
This commit is contained in:
parent
74c26b42da
commit
7c08864444
@ -101,14 +101,13 @@ export async function ensureMimeTypesForHighlighting(mimeTypeHint?: string) {
|
||||
export async function loadHighlightingTheme(themeName: string) {
|
||||
const themePrefix = "default:";
|
||||
let theme: Theme | null = null;
|
||||
if (themeName.includes(themePrefix)) {
|
||||
if (glob.device === "print") {
|
||||
theme = Themes.vs;
|
||||
} else if (themeName.includes(themePrefix)) {
|
||||
theme = Themes[themeName.substring(themePrefix.length)];
|
||||
}
|
||||
if (!theme) {
|
||||
theme = Themes.default;
|
||||
}
|
||||
|
||||
await loadTheme(theme);
|
||||
await loadTheme(theme ?? Themes.default);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user