From 3ad7605abe0551d3a583fb52c34517728a76639d Mon Sep 17 00:00:00 2001 From: anime Date: Wed, 9 Jul 2025 14:09:37 +0800 Subject: [PATCH] fix: prevent processing content for page type blocks - Skip content processing when block type is 'page' - Update debug log message for content text concatenation --- lib/notion/getPageContentText.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/notion/getPageContentText.js b/lib/notion/getPageContentText.js index 79fe5689..18672cc0 100644 --- a/lib/notion/getPageContentText.js +++ b/lib/notion/getPageContentText.js @@ -14,7 +14,7 @@ export function getPageContentText(post, pageBlockMap) { } const textArray = properties['title'] || properties['caption'] result.push(getTextArray(textArray)) - if (block['content']?.length > 0) { + if (block.type !== 'page' && block['content']?.length > 0) { for (const blockContent of block.content) { result.push(getBlockContentText(blockContent)) } @@ -95,6 +95,6 @@ export function getPageContentText(post, pageBlockMap) { } } } - // console.log(contentTextList.join('')) + console.log('开始', contentTextList.join(''), '结束') return contentTextList.join('') }