This commit is contained in:
Daniel 2024-01-23 12:01:36 +08:00
parent 27849320dc
commit 04b1b3e3d5
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -287,7 +287,10 @@ func NodeStaticContent(node *ast.Node, excludeTypes []string, includeTextMarkATi
lastSpace = false lastSpace = false
return ast.WalkContinue return ast.WalkContinue
}) })
return strings.TrimSpace(buf.String())
// 这里不要 trim否则无法搜索首尾空格
// Improve search and replace for spaces https://github.com/siyuan-note/siyuan/issues/10231
return buf.String()
} }
func FirstLeafBlock(node *ast.Node) (ret *ast.Node) { func FirstLeafBlock(node *ast.Node) (ret *ast.Node) {