浏览代码

:bug: 标题块下方块反向链接计算问题 https://github.com/siyuan-note/siyuan/issues/5822

Liang Ding 2 年之前
父节点
当前提交
3473496a43
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      kernel/model/backlink.go

+ 1 - 1
kernel/model/backlink.go

@@ -238,7 +238,7 @@ func BuildTreeBacklink(id, keyword, mentionKeyword string, beforeLen int) (boxID
 	}
 	}
 	paragraphParents := sql.GetBlocks(paragraphParentIDs)
 	paragraphParents := sql.GetBlocks(paragraphParentIDs)
 	for _, p := range paragraphParents {
 	for _, p := range paragraphParents {
-		if "i" == p.Type {
+		if "i" == p.Type || "h" == p.Type {
 			linkRefs = append(linkRefs, fromSQLBlock(p, keyword, beforeLen))
 			linkRefs = append(linkRefs, fromSQLBlock(p, keyword, beforeLen))
 			processedParagraphs.Add(p.ID)
 			processedParagraphs.Add(p.ID)
 		}
 		}