From 65eee88b971f4e02ec0cf7263e9382e9b5fee922 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Thu, 8 Dec 2022 16:34:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=98=E5=8F=A0=E4=BB=A3=E7=A0=81=E4=BF=AE?= =?UTF-8?q?=E8=A1=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/PrismMac.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/PrismMac.js b/components/PrismMac.js index 687bf666..22fc3709 100644 --- a/components/PrismMac.js +++ b/components/PrismMac.js @@ -23,8 +23,8 @@ const PrismMac = () => { const observer = new MutationObserver(mutationsList => { for (const m of mutationsList) { if (m.target.nodeName === 'DETAILS') { - const preCode = m.target.querySelector('pre.notion-code') - if (preCode) { + const preCodes = m.target.querySelectorAll('pre.notion-code') + for (const preCode of preCodes) { Prism.plugins.lineNumbers.resize(preCode) } }