From 9a67a5e5b18c422e7dcd49bf57b55f8103dee8d3 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Mon, 30 Jan 2023 09:48:16 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E5=B5=8C=E5=85=A5=E5=9D=97=E6=AF=8F?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E4=B8=80=E6=AC=A1=E5=A4=9A=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=20Fix=20https://github.com/siyuan-note/siyua?= =?UTF-8?q?n/issues/7196?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/index.go | 1 + kernel/model/search.go | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/model/index.go b/kernel/model/index.go index e2824f723..e9d111432 100644 --- a/kernel/model/index.go +++ b/kernel/model/index.go @@ -218,6 +218,7 @@ func updateEmbedBlockContent(embedBlockID string, queryResultBlocks []*EmbedBloc return } + embedBlock.Content = "" // 嵌入块每查询一次多一个结果 https://github.com/siyuan-note/siyuan/issues/7196 for _, block := range queryResultBlocks { embedBlock.Content += block.Block.Markdown } diff --git a/kernel/model/search.go b/kernel/model/search.go index 243db19d4..c0c7adb93 100644 --- a/kernel/model/search.go +++ b/kernel/model/search.go @@ -50,8 +50,6 @@ type EmbedBlock struct { } func SearchEmbedBlock(embedBlockID, stmt string, excludeIDs []string, headingMode int, breadcrumb bool) (ret []*EmbedBlock) { - time.Sleep(util.FrontendQueueInterval) - WaitForWritingFiles() return searchEmbedBlock(embedBlockID, stmt, excludeIDs, headingMode, breadcrumb) }