diff --git a/docs/index.html b/docs/index.html index 9c381da99..eef5f1280 100644 --- a/docs/index.html +++ b/docs/index.html @@ -55,6 +55,10 @@ }) } + function escapeHTML(html) { + return html.replaceAll('&', '&').replaceAll('<', '<').replaceAll('>', '>').replaceAll('"', '"').replaceAll('\'', ''') + } + window.$docsify = { search: 'auto', name: 'mermaid', @@ -73,7 +77,7 @@ currentCodeExample++; colorize.push(currentCodeExample); resultingHTML += ( - '
' + code + '
' + '
' + escapeHTML(code) + '
' ) } @@ -100,10 +104,11 @@ }) hook.afterEach(function (html, next) { + next(html); (async() => { while (!window.hasOwnProperty("monaco")) await new Promise(resolve => setTimeout(resolve, 1000)); - colorizeEverything(html).then(newHTML => next(newHTML)) + colorizeEverything(html).then(newHTML => document.querySelector('article.markdown-section').innerHTML = newHTML) })(); }) }