diff --git a/src/public/app/services/library_loader.js b/src/public/app/services/library_loader.js index a6b770038..f5299ae33 100644 --- a/src/public/app/services/library_loader.js +++ b/src/public/app/services/library_loader.js @@ -158,7 +158,16 @@ async function requireCss(url, prependAssetPath = true) { let highlightingThemeEl = null; function loadHighlightingTheme(theme) { - if (!theme) { + if (!theme) { + return; + } + + if (theme === "none") { + // Deactivate the theme. + if (highlightingThemeEl) { + highlightingThemeEl.remove(); + highlightingThemeEl = null; + } return; }