mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-21 19:41:05 +08:00
🎨 Improve the breadcrumb https://github.com/siyuan-note/siyuan/issues/13141
This commit is contained in:
parent
ea0146ceb9
commit
53e2953d65
@ -455,10 +455,7 @@ func buildBlockBreadcrumb(node *ast.Node, excludeTypes []string, isEmbedBlock bo
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
id := parent.ID
|
id := parent.ID
|
||||||
fc := parent.FirstChild
|
fc := treenode.FirstLeafBlock(parent)
|
||||||
if nil != fc && ast.NodeTaskListItemMarker == fc.Type {
|
|
||||||
fc = fc.Next
|
|
||||||
}
|
|
||||||
|
|
||||||
name := parent.IALAttr("name")
|
name := parent.IALAttr("name")
|
||||||
if ast.NodeDocument == parent.Type {
|
if ast.NodeDocument == parent.Type {
|
||||||
@ -467,7 +464,7 @@ func buildBlockBreadcrumb(node *ast.Node, excludeTypes []string, isEmbedBlock bo
|
|||||||
name, _ = av.GetAttributeViewName(parent.AttributeViewID)
|
name, _ = av.GetAttributeViewName(parent.AttributeViewID)
|
||||||
} else {
|
} else {
|
||||||
if "" == name {
|
if "" == name {
|
||||||
if ast.NodeListItem == parent.Type {
|
if ast.NodeListItem == parent.Type || ast.NodeList == parent.Type || ast.NodeSuperBlock == parent.Type || ast.NodeBlockquote == parent.Type {
|
||||||
name = gulu.Str.SubStr(renderBlockText(fc, excludeTypes), maxNameLen)
|
name = gulu.Str.SubStr(renderBlockText(fc, excludeTypes), maxNameLen)
|
||||||
} else {
|
} else {
|
||||||
name = gulu.Str.SubStr(renderBlockText(parent, excludeTypes), maxNameLen)
|
name = gulu.Str.SubStr(renderBlockText(parent, excludeTypes), maxNameLen)
|
||||||
|
Loading…
Reference in New Issue
Block a user