mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 15:10:12 +01:00
🎨 反链面板支持过滤关键字高亮 Fix https://github.com/siyuan-note/siyuan/issues/7028
This commit is contained in:
parent
6d79c35452
commit
11fabe83ad
1 changed files with 6 additions and 0 deletions
|
|
@ -69,6 +69,7 @@ type Backlink struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetBackmentionDoc(defID, refTreeID, keyword string) (ret []*Backlink) {
|
func GetBackmentionDoc(defID, refTreeID, keyword string) (ret []*Backlink) {
|
||||||
|
keyword = strings.TrimSpace(keyword)
|
||||||
ret = []*Backlink{}
|
ret = []*Backlink{}
|
||||||
beforeLen := 12
|
beforeLen := 12
|
||||||
sqlBlock := sql.GetBlock(defID)
|
sqlBlock := sql.GetBlock(defID)
|
||||||
|
|
@ -90,6 +91,11 @@ func GetBackmentionDoc(defID, refTreeID, keyword string) (ret []*Backlink) {
|
||||||
mentions = append(mentions, mention)
|
mentions = append(mentions, mention)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if "" != keyword {
|
||||||
|
mentionKeywords = append(mentionKeywords, keyword)
|
||||||
|
}
|
||||||
|
mentionKeywords = gulu.Str.RemoveDuplicatedElem(mentionKeywords)
|
||||||
for _, mention := range mentions {
|
for _, mention := range mentions {
|
||||||
refTree := treeCache[mention.RootID]
|
refTree := treeCache[mention.RootID]
|
||||||
if nil == refTree {
|
if nil == refTree {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue