mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 15:40:12 +01:00
✨ Support for searching asset content https://github.com/siyuan-note/siyuan/issues/8874
This commit is contained in:
parent
b501c1badc
commit
c553c87c63
1 changed files with 7 additions and 1 deletions
|
|
@ -194,8 +194,14 @@ func (parser *TxtAssetParser) Parse(absPath string) (ret *AssetParseResult) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
content := normalizeAssetContent(string(data))
|
||||||
ret = &AssetParseResult{
|
ret = &AssetParseResult{
|
||||||
Content: string(data),
|
Content: content,
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func normalizeAssetContent(content string) (ret string) {
|
||||||
|
ret = strings.Join(strings.Fields(content), " ")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue