mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-05 23:21:47 +01:00
🎨 位于超级块中的嵌入块不显示面包屑 Fix https://github.com/siyuan-note/siyuan/issues/6258
This commit is contained in:
parent
6352273052
commit
4e7c898273
7 changed files with 12 additions and 14 deletions
|
|
@ -393,14 +393,6 @@ func getEmbeddedBlock(embedBlockID string, trees map[string]*parse.Tree, sqlBloc
|
|||
if nil == def {
|
||||
return
|
||||
}
|
||||
embedNodeTree, _ := loadTreeByBlockID(embedBlockID)
|
||||
if nil == embedNodeTree {
|
||||
return
|
||||
}
|
||||
embedNode := treenode.GetNodeInTree(embedNodeTree, embedBlockID)
|
||||
if nil == embedNode {
|
||||
return
|
||||
}
|
||||
|
||||
var unlinks, nodes []*ast.Node
|
||||
ast.Walk(def, func(n *ast.Node, entering bool) ast.WalkStatus {
|
||||
|
|
@ -444,7 +436,12 @@ func getEmbeddedBlock(embedBlockID string, trees map[string]*parse.Tree, sqlBloc
|
|||
block = &Block{Box: def.Box, Path: def.Path, HPath: b.HPath, ID: def.ID, Type: def.Type.String(), Content: dom}
|
||||
|
||||
// 位于超级块中的嵌入块不显示面包屑 https://github.com/siyuan-note/siyuan/issues/6258
|
||||
inSuperBlock := embedNode.ParentIs(ast.NodeSuperBlock)
|
||||
inSuperBlock := false
|
||||
embedNodeTree, _ := loadTreeByBlockID(embedBlockID)
|
||||
if nil != embedNodeTree {
|
||||
embedNode := treenode.GetNodeInTree(embedNodeTree, embedBlockID)
|
||||
inSuperBlock = nil != embedNode && embedNode.ParentIs(ast.NodeSuperBlock)
|
||||
}
|
||||
|
||||
if breadcrumb && !inSuperBlock {
|
||||
blockPaths = buildBlockBreadcrumb(def)
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ type EmbedBlock struct {
|
|||
}
|
||||
|
||||
func SearchEmbedBlock(embedBlockID, stmt string, excludeIDs []string, headingMode int, breadcrumb bool) (ret []*EmbedBlock) {
|
||||
time.Sleep(512 * time.Millisecond /* 前端队列轮询间隔 */)
|
||||
WaitForWritingFiles()
|
||||
return searchEmbedBlock(embedBlockID, stmt, excludeIDs, headingMode, breadcrumb)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue