mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-13 23:16:47 +00:00
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
This commit is contained in:
@@ -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('')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user