fix s bug

This commit is contained in:
tangly1024.com
2023-07-20 18:07:42 +08:00
parent 7c5517fb41
commit ad980e26ce
2 changed files with 6 additions and 6 deletions

View File

@@ -119,13 +119,13 @@ const renderMermaid = async() => {
}
}
})
if (document.querySelector('#container-inner')) {
observer.observe(document.querySelector('#container-inner'), { attributes: true, subtree: true })
if (document.querySelector('#notion-article')) {
observer.observe(document.querySelector('#notion-article'), { attributes: true, subtree: true })
}
}
function renderPrismMac() {
const container = document?.getElementById('container-inner')
const container = document?.getElementById('notion-article')
// Add line numbers
if (BLOG.CODE_LINE_NUMBERS === 'true') {
@@ -182,7 +182,7 @@ const fixCodeLineStyle = () => {
}
}
})
observer.observe(document.querySelector('#container'), { attributes: true, subtree: true })
observer.observe(document.querySelector('#notion-article'), { attributes: true, subtree: true })
setTimeout(() => {
const preCodes = document.querySelectorAll('pre.notion-code')
for (const preCode of preCodes) {