feat(client/print): enforce VS code theme when printing code notes

This commit is contained in:
Elian Doran 2025-10-20 11:06:26 +03:00
parent 74c26b42da
commit 7c08864444
No known key found for this signature in database

View File

@ -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);
}
/**