提交 6d6655e9 编写于 作者: K Kamran Ahmed

Fix - Demo doesn't work when code highlight fails

上级 92868a73
......@@ -128,10 +128,14 @@ document.addEventListener('DOMContentLoaded', function () {
});
document.querySelectorAll('pre code')
.forEach((element) => {
hljs.highlightBlock(element);
});
try {
document.querySelectorAll('pre code')
.forEach((element) => {
hljs.highlightBlock(element);
});
} catch (e) {
// Silently ignore the highlight errors
}
/////////////////////////////////////////////
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册