code 调整

This commit is contained in:
tangly1024.com
2023-07-26 18:44:45 +08:00
parent 5cf74fcf11
commit 155d5ea334
2 changed files with 3 additions and 3 deletions

View File

@@ -158,7 +158,7 @@ function renderPrismMac() {
const container = document?.getElementById('notion-article')
// Add line numbers
if (BLOG.CODE_LINE_NUMBERS === 'true') {
if (JSON.parse(BLOG.CODE_LINE_NUMBERS)) {
const codeBlocks = container?.getElementsByTagName('pre')
if (codeBlocks) {
Array.from(codeBlocks).forEach(item => {
@@ -192,7 +192,7 @@ function renderPrismMac() {
}
// 折叠代码行号bug
if (BLOG.CODE_LINE_NUMBERS === 'true') {
if (JSON.parse(BLOG.CODE_LINE_NUMBERS)) {
fixCodeLineStyle()
}
}