mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-01 07:26:47 +00:00
折叠代码修补
This commit is contained in:
@@ -23,8 +23,8 @@ const PrismMac = () => {
|
|||||||
const observer = new MutationObserver(mutationsList => {
|
const observer = new MutationObserver(mutationsList => {
|
||||||
for (const m of mutationsList) {
|
for (const m of mutationsList) {
|
||||||
if (m.target.nodeName === 'DETAILS') {
|
if (m.target.nodeName === 'DETAILS') {
|
||||||
const preCode = m.target.querySelector('pre.notion-code')
|
const preCodes = m.target.querySelectorAll('pre.notion-code')
|
||||||
if (preCode) {
|
for (const preCode of preCodes) {
|
||||||
Prism.plugins.lineNumbers.resize(preCode)
|
Prism.plugins.lineNumbers.resize(preCode)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user