fix: prevent processing content for page type blocks

- Skip content processing when block type is 'page'
- Update debug log message for content text concatenation
This commit is contained in:
anime
2025-07-09 14:09:37 +08:00
parent 2a0f4fd49c
commit 3ad7605abe

View File

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