Skip to content

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

:sparkles: Support for searching asset content https://github.com/siyuan-note/siyuan/issues/8874

Danielc553c87c63c8
diff --git a/kernel/model/asset_content.go b/kernel/model/asset_content.go
index b353a86bd8..31119e335f 100644
--- a/kernel/model/asset_content.go
+++ b/kernel/model/asset_content.go
@@ -194,8 +194,14 @@ func (parser *TxtAssetParser) Parse(absPath string) (ret *AssetParseResult) {
return
}
+ content := normalizeAssetContent(string(data))
ret = &AssetParseResult{
- Content: string(data),
+ Content: content,
}
return
}
+
+func normalizeAssetContent(content string) (ret string) {
+ ret = strings.Join(strings.Fields(content), " ")
+ return
+}