mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-13 15:09:13 +00:00
fix s bug
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -48,9 +48,9 @@ export default function PostHeader({ post, siteInfo }) {
|
||||
|
||||
{post.tagItems && (
|
||||
<div className="hidden md:flex justify-center flex-nowrap overflow-x-auto">
|
||||
{post.tagItems.map(tag => (
|
||||
{post.tagItems.map((tag, index) => (
|
||||
<Link
|
||||
key={tag}
|
||||
key={index}
|
||||
href={`/tag/${encodeURIComponent(tag.name)}`}
|
||||
passHref
|
||||
className={'cursor-pointer inline-block text-gray-50 hover:text-white duration-200 py-0.5 px-1 whitespace-nowrap '}>
|
||||
|
||||
Reference in New Issue
Block a user