From 74c26b42da93579fc1ea16e558bd77b3402d86ad Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 20 Oct 2025 11:00:49 +0300 Subject: [PATCH] fix(client/print): syntax highlighting not loading on code notes --- apps/client/src/services/syntax_highlight.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/client/src/services/syntax_highlight.ts b/apps/client/src/services/syntax_highlight.ts index 9b5592a6b..e0ce55f42 100644 --- a/apps/client/src/services/syntax_highlight.ts +++ b/apps/client/src/services/syntax_highlight.ts @@ -76,7 +76,7 @@ export async function ensureMimeTypesForHighlighting(mimeTypeHint?: string) { // Load theme. const currentThemeName = String(options.get("codeBlockTheme")); - loadHighlightingTheme(currentThemeName); + await loadHighlightingTheme(currentThemeName); // Load mime types. let mimeTypes: MimeType[]; @@ -98,7 +98,7 @@ export async function ensureMimeTypesForHighlighting(mimeTypeHint?: string) { highlightingLoaded = true; } -export function loadHighlightingTheme(themeName: string) { +export async function loadHighlightingTheme(themeName: string) { const themePrefix = "default:"; let theme: Theme | null = null; if (themeName.includes(themePrefix)) { @@ -108,7 +108,7 @@ export function loadHighlightingTheme(themeName: string) { theme = Themes.default; } - loadTheme(theme); + await loadTheme(theme); } /**