Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
feat(client/print): enforce VS code theme when printing code notes
Elian Doran7c08864444cc
diff --git a/apps/client/src/services/syntax_highlight.ts b/apps/client/src/services/syntax_highlight.tsindex e0ce55f427..2a545fc8b9 100644--- a/apps/client/src/services/syntax_highlight.ts+++ b/apps/client/src/services/syntax_highlight.ts@@ -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);}/**