From 9886e4d146cf7270d7b833e7dc847bde797192c6 Mon Sep 17 00:00:00 2001 From: anime Date: Wed, 9 Jul 2025 16:12:12 +0800 Subject: [PATCH] feat(getPageContentText): add references to NotionX types and comment out debug log - Add reference links to NotionX type definitions for better documentation - Comment out debug console.log statement to clean up output - Maintain existing functionality while improving code clarity --- lib/notion/getPageContentText.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/notion/getPageContentText.js b/lib/notion/getPageContentText.js index d8095588..06a11f7f 100644 --- a/lib/notion/getPageContentText.js +++ b/lib/notion/getPageContentText.js @@ -42,7 +42,7 @@ function getFullTextContent(text) { const ref = Array.isArray(decorations) ? decorations[0] : null const type = ref?.[0] const data = ref?.[1] - + // todo: 处理更多类型 https://github.com/NotionX/react-notion-x/blob/9ee2d9334e260ee3600f4f8d7212f66b641b19cc/packages/notion-types/src/core.ts#L108 switch (type) { case 'd': // 日期字符串 @@ -119,7 +119,7 @@ export function getPageContentText(post, pageBlockMap) { return '' } const blockType = block.type - // todo: 处理更多类型 + // todo: 处理更多类型 https://github.com/NotionX/react-notion-x/blob/9ee2d9334e260ee3600f4f8d7212f66b641b19cc/packages/notion-types/src/block.ts#L3 switch (blockType) { case 'transclusion_reference': return getTransclusionReference(block) @@ -176,6 +176,6 @@ export function getPageContentText(post, pageBlockMap) { } } } - console.log('开始', contentTextList.join(''), '结束') + // console.log('开始', contentTextList.join(''), '结束') return contentTextList.join('') }