From fc4f614e72fdb1873ea598557de901712c823543 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Wed, 24 Jul 2024 21:08:36 +0800 Subject: [PATCH] :art: Improve block ref searching https://github.com/siyuan-note/siyuan/issues/12010 --- kernel/sql/block_ref_query.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sql/block_ref_query.go b/kernel/sql/block_ref_query.go index 8593d848a..2dcdc2dfc 100644 --- a/kernel/sql/block_ref_query.go +++ b/kernel/sql/block_ref_query.go @@ -363,7 +363,7 @@ func QueryRefIDsByDefID(defID string, containChildren bool) (refIDs, refTexts [] func QueryRefsRecent(onlyDoc bool, typeFilter string, ignoreLines []string) (ret []*Ref) { stmt := "SELECT r.* FROM refs AS r, blocks AS b WHERE b.id = r.def_block_id AND b.type IN " + typeFilter if onlyDoc { - stmt = "SELECT r.* FROM refs AS r, blocks AS b WHERE b.type = 'd' AND b.id = r.def_block_id" + stmt = "SELECT r.* FROM refs AS r, blocks AS b WHERE b.id = r.def_block_id AND b.type = 'd'" } if 0 < len(ignoreLines) { // Support ignore search results https://github.com/siyuan-note/siyuan/issues/10089