Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Improve breadcrumb https://github.com/siyuan-note/siyuan/issues/13141#issuecomment-2476789553

Daniel8229dded32cf
diff --git a/kernel/model/blockinfo.go b/kernel/model/blockinfo.go
index 415b4cea73..07422d968b 100644
--- a/kernel/model/blockinfo.go
+++ b/kernel/model/blockinfo.go
@@ -468,6 +468,10 @@ func buildBlockBreadcrumb(node *ast.Node, excludeTypes []string, isEmbedBlock bo
add := true
if ast.NodeList == parent.Type || ast.NodeSuperBlock == parent.Type || ast.NodeBlockquote == parent.Type {
add = false
+ if parent == node {
+ // https://github.com/siyuan-note/siyuan/issues/13141#issuecomment-2476789553
+ add = true
+ }
}
if ast.NodeParagraph == parent.Type && nil != parent.Parent && ast.NodeListItem == parent.Parent.Type && nil == parent.Next && (nil == parent.Previous || ast.NodeTaskListItemMarker == parent.Previous.Type) {
add = false