From 070e2667b60329b3b26f86c48f02ace2387a754e Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sun, 28 Apr 2024 10:23:17 +0800 Subject: [PATCH] :art: Count backlink mentions using total occurrences https://github.com/siyuan-note/siyuan/issues/11173 --- kernel/model/backlink.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/model/backlink.go b/kernel/model/backlink.go index d323d7494..360c336fb 100644 --- a/kernel/model/backlink.go +++ b/kernel/model/backlink.go @@ -315,7 +315,9 @@ func GetBacklink2(id, keyword, mentionKeyword string, sortMode, mentionSortMode return backmentions[i].ID > backmentions[j].ID }) - mentionsCount = len(backmentions) + for _, backmention := range backmentions { + mentionsCount += backmention.Count + } // 添加笔记本名称 var boxIDs []string