🎨 Improve the backlink panel breadcrumb and block sorting https://github.com/siyuan-note/siyuan/issues/13008

This commit is contained in:
Daniel 2024-11-04 17:46:10 +08:00
parent 6ac292ff01
commit f0a292ac51
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 8 additions and 11 deletions

View file

@ -416,11 +416,11 @@ func BuildBlockBreadcrumb(id string, excludeTypes []string) (ret []*BlockPath, e
return
}
ret = buildBlockBreadcrumb(node, excludeTypes, true)
ret = buildBlockBreadcrumb(node, excludeTypes)
return
}
func buildBlockBreadcrumb(node *ast.Node, excludeTypes []string, displayCurrentNode bool) (ret []*BlockPath) {
func buildBlockBreadcrumb(node *ast.Node, excludeTypes []string) (ret []*BlockPath) {
ret = []*BlockPath{}
if nil == node {
return
@ -481,8 +481,8 @@ func buildBlockBreadcrumb(node *ast.Node, excludeTypes []string, displayCurrentN
name = strings.ReplaceAll(name, editor.Caret, "")
name = util.EscapeHTML(name)
if parent == node && !displayCurrentNode {
add = false
if parent == node {
name = ""
}
if add {