Skip to content

Commit 38e63ad

Browse files
committed
doc: 增加高亮配置
1 parent 5de3f67 commit 38e63ad

File tree

1 file changed

+4
-1
lines changed
  • src/BootstrapBlazor.Server/Components/Components

1 file changed

+4
-1
lines changed

src/BootstrapBlazor.Server/Components/Components/Pre.razor.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export async function highlight(id) {
5555

5656
if (el) {
5757
const invoke = () => {
58-
hljs.highlightElement(el.querySelector('code'))
58+
hljs.highlightElement(el.querySelector('code'));
5959
el.querySelector('.loading').classList.add('d-none')
6060
el.classList.remove('loaded')
6161
}
@@ -64,6 +64,9 @@ export async function highlight(id) {
6464
const handler = setInterval(() => {
6565
const done = window.hljs !== void 0;
6666
if (done) {
67+
hljs.configure({
68+
ignoreUnescapedHTML: true
69+
});
6770
clearInterval(handler)
6871
resolve()
6972
}

0 commit comments

Comments
 (0)