mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 03:59:05 +01:00
fix(client/print): syntax highlighting not loading on code notes
This commit is contained in:
parent
f0fa55715c
commit
74c26b42da
@ -76,7 +76,7 @@ export async function ensureMimeTypesForHighlighting(mimeTypeHint?: string) {
|
|||||||
|
|
||||||
// Load theme.
|
// Load theme.
|
||||||
const currentThemeName = String(options.get("codeBlockTheme"));
|
const currentThemeName = String(options.get("codeBlockTheme"));
|
||||||
loadHighlightingTheme(currentThemeName);
|
await loadHighlightingTheme(currentThemeName);
|
||||||
|
|
||||||
// Load mime types.
|
// Load mime types.
|
||||||
let mimeTypes: MimeType[];
|
let mimeTypes: MimeType[];
|
||||||
@ -98,7 +98,7 @@ export async function ensureMimeTypesForHighlighting(mimeTypeHint?: string) {
|
|||||||
highlightingLoaded = true;
|
highlightingLoaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function loadHighlightingTheme(themeName: string) {
|
export async function loadHighlightingTheme(themeName: string) {
|
||||||
const themePrefix = "default:";
|
const themePrefix = "default:";
|
||||||
let theme: Theme | null = null;
|
let theme: Theme | null = null;
|
||||||
if (themeName.includes(themePrefix)) {
|
if (themeName.includes(themePrefix)) {
|
||||||
@ -108,7 +108,7 @@ export function loadHighlightingTheme(themeName: string) {
|
|||||||
theme = Themes.default;
|
theme = Themes.default;
|
||||||
}
|
}
|
||||||
|
|
||||||
loadTheme(theme);
|
await loadTheme(theme);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user