diff --git a/util/gh-pages/index.html b/util/gh-pages/index.html index 6183089911b..c5d602ea303 100644 --- a/util/gh-pages/index.html +++ b/util/gh-pages/index.html @@ -15,7 +15,8 @@ Otherwise, have a great day =^.^= Clippy Lints - + + @@ -561,8 +562,8 @@ Otherwise, have a great day =^.^= - - + + diff --git a/util/gh-pages/script.js b/util/gh-pages/script.js index 6909fbcae09..366e7c8843f 100644 --- a/util/gh-pages/script.js +++ b/util/gh-pages/script.js @@ -7,7 +7,7 @@ if (lang && hljs.getLanguage(lang)) { try { return '
' +
-                        hljs.highlight(lang, str, true).value +
+                        hljs.highlight(str, { language: lang, ignoreIllegals: true }).value +
                         '
'; } catch (__) {} } @@ -365,6 +365,9 @@ function setTheme(theme, store) { document.getElementsByTagName("body")[0].className = theme; + document.getElementById("githubLightHighlight").disabled = enableNight || !enableHighlight; + document.getElementById("githubDarkHighlight").disabled = !enableNight && !enableAyu; + document.getElementById("styleHighlight").disabled = !enableHighlight; document.getElementById("styleNight").disabled = !enableNight; document.getElementById("styleAyu").disabled = !enableAyu;