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('') }