From 53e2953d657abb9779d3667256e36a521badfad0 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sat, 16 Nov 2024 09:28:45 +0800 Subject: [PATCH] :art: Improve the breadcrumb https://github.com/siyuan-note/siyuan/issues/13141 --- kernel/model/blockinfo.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/kernel/model/blockinfo.go b/kernel/model/blockinfo.go index c1db275a9..2d8adfc3e 100644 --- a/kernel/model/blockinfo.go +++ b/kernel/model/blockinfo.go @@ -455,10 +455,7 @@ func buildBlockBreadcrumb(node *ast.Node, excludeTypes []string, isEmbedBlock bo continue } id := parent.ID - fc := parent.FirstChild - if nil != fc && ast.NodeTaskListItemMarker == fc.Type { - fc = fc.Next - } + fc := treenode.FirstLeafBlock(parent) name := parent.IALAttr("name") if ast.NodeDocument == parent.Type { @@ -467,7 +464,7 @@ func buildBlockBreadcrumb(node *ast.Node, excludeTypes []string, isEmbedBlock bo name, _ = av.GetAttributeViewName(parent.AttributeViewID) } else { 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) } else { name = gulu.Str.SubStr(renderBlockText(parent, excludeTypes), maxNameLen)