🎨 Find and replace supports query syntax https://github.com/siyuan-note/siyuan/issues/14937

This commit is contained in:
Daniel 2025-05-30 12:11:49 +08:00
parent 93ceb872ce
commit 572baa99bd
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
15 changed files with 24 additions and 25 deletions

View file

@ -457,11 +457,17 @@ func prependNotebookNameInHPath(blocks []*Block) {
func FindReplace(keyword, replacement string, replaceTypes map[string]bool, ids []string, paths, boxes []string, types map[string]bool, method, orderBy, groupBy int) (err error) {
// method0文本1查询语法2SQL3正则表达式
if 1 == method || 2 == method {
if 2 == method {
err = errors.New(Conf.Language(132))
return
}
if 1 == method {
// 将查询语法等价于关键字,因为 keyword 参数已经是结果关键字了
// Find and replace supports query syntax https://github.com/siyuan-note/siyuan/issues/14937
method = 0
}
if 0 != groupBy {
// 按文档分组后不支持替换 Need to be reminded that replacement operations are not supported after grouping by doc https://github.com/siyuan-note/siyuan/issues/10161
// 因为分组条件传入以后搜索只能命中文档块,会导致 全部替换 失效