Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: Skip empty embed queries without warning https://github.com/siyuan-note/siyuan/issues/19515

Daniel2cc1ade6dbe5
diff --git a/kernel/model/index.go b/kernel/model/index.go
index 99c82e31b7..d68924b98b 100644
--- a/kernel/model/index.go
+++ b/kernel/model/index.go
@@ -378,6 +378,9 @@ func autoIndexEmbedBlock() {
// 需要移除首尾的空白字符以判断是否具有 //!js 标记
stmt = strings.TrimSpace(stmt)
+ if "" == stmt {
+ continue
+ }
if strings.HasPrefix(stmt, "//!js") {
// https://github.com/siyuan-note/siyuan/issues/9648
// js 嵌入块不支持自动索引,由前端主动调用 /api/search/updateEmbedBlock 接口更新内容 https://github.com/siyuan-note/siyuan/issues/9736