add comment

This commit is contained in:
EFL
2024-07-14 11:20:29 +08:00
parent 11f34d4748
commit 2045b41873

View File

@@ -93,7 +93,9 @@ function filterPostBlocks(id, blockMap, slice) {
continue
}
// 当BlockId等于PageId时移除
if (b?.value?.id === id) {
// 此block含有敏感信息
delete b?.value?.properties
continue
}
@@ -102,19 +104,20 @@ function filterPostBlocks(id, blockMap, slice) {
if (b?.value?.type === 'sync_block' && b?.value?.children) {
const childBlocks = b.value.children
// Remove the sync block
// 移除同步块
delete clonePageBlock.block[blockId]
// Insert child blocks in place of the sync block
// 用子块替代同步块
childBlocks.forEach((childBlock, index) => {
const newBlockId = `${blockId}_child_${index}`
clonePageBlock.block[newBlockId] = childBlock
blocksToProcess.splice(i + index + 1, 0, newBlockId)
})
// Adjust the loop counter to process the newly inserted blocks
// 重新处理新加入的子块
i--
continue
}
// 处理 c++、c#、汇编等语言名字映射
if (b?.value?.type === 'code') {
if (b?.value?.properties?.language?.[0][0] === 'C++') {
b.value.properties.language[0][0] = 'cpp'
@@ -127,6 +130,7 @@ function filterPostBlocks(id, blockMap, slice) {
}
}
// 如果是文件或嵌入式PDF需要重新加密签名
if (
(b?.value?.type === 'file' ||
b?.value?.type === 'pdf' ||