mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Find and replace supports query syntax https://github.com/siyuan-note/siyuan/issues/14937
This commit is contained in:
parent
93ceb872ce
commit
572baa99bd
15 changed files with 24 additions and 25 deletions
|
|
@ -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) {
|
||||
// method:0:文本,1:查询语法,2:SQL,3:正则表达式
|
||||
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
|
||||
// 因为分组条件传入以后搜索只能命中文档块,会导致 全部替换 失效
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue