Browse Source

:art: The backlink panel supports filtering by the block attributes https://github.com/siyuan-note/siyuan/issues/12985

Daniel 7 months ago
parent
commit
247b534aa0
1 changed files with 5 additions and 1 deletions
  1. 5 1
      kernel/model/backlink.go

+ 5 - 1
kernel/model/backlink.go

@@ -614,7 +614,11 @@ func matchBacklinkKeyword(block *Block, keywords []string) bool {
 
 	for _, k := range keywords {
 		k = strings.ToLower(k)
-		if strings.Contains(strings.ToLower(block.FContent), k) ||
+		content := block.Content
+		if block.IsContainerBlock() {
+			content = block.FContent
+		}
+		if strings.Contains(strings.ToLower(content), k) ||
 			strings.Contains(strings.ToLower(path.Base(block.HPath)), k) ||
 			strings.Contains(strings.ToLower(block.Name), k) ||
 			strings.Contains(strings.ToLower(block.Alias), k) ||