mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 OCR no longer blocks document loading https://github.com/siyuan-note/siyuan/issues/9230
This commit is contained in:
parent
b31765d0ab
commit
283917a9a8
8 changed files with 123 additions and 11 deletions
|
|
@ -798,9 +798,18 @@ func buildBlockFromNode(n *ast.Node, tree *parse.Tree) (block *Block, attributes
|
|||
length = utf8.RuneCountInString(fcontent)
|
||||
} else if n.IsContainerBlock() {
|
||||
markdown = treenode.ExportNodeStdMd(n, luteEngine)
|
||||
|
||||
if !treenode.IsNodeOCRed(n) {
|
||||
IndexNodeQueue(n.ID)
|
||||
}
|
||||
content = treenode.NodeStaticContent(n, nil, true, indexAssetPath)
|
||||
fc := treenode.FirstLeafBlock(n)
|
||||
|
||||
if !treenode.IsNodeOCRed(fc) {
|
||||
IndexNodeQueue(fc.ID)
|
||||
}
|
||||
fcontent = treenode.NodeStaticContent(fc, nil, true, false)
|
||||
|
||||
parentID = n.Parent.ID
|
||||
// 将标题块作为父节点
|
||||
if h := heading(n); nil != h {
|
||||
|
|
@ -809,7 +818,13 @@ func buildBlockFromNode(n *ast.Node, tree *parse.Tree) (block *Block, attributes
|
|||
length = utf8.RuneCountInString(fcontent)
|
||||
} else {
|
||||
markdown = treenode.ExportNodeStdMd(n, luteEngine)
|
||||
|
||||
if !treenode.IsNodeOCRed(n) {
|
||||
IndexNodeQueue(n.ID)
|
||||
}
|
||||
|
||||
content = treenode.NodeStaticContent(n, nil, true, indexAssetPath)
|
||||
|
||||
parentID = n.Parent.ID
|
||||
// 将标题块作为父节点
|
||||
if h := heading(n); nil != h {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue