mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
🎨 Replace All is no longer affected by pagination https://github.com/siyuan-note/siyuan/issues/8265
This commit is contained in:
parent
dce9d4da54
commit
ecd4a58d03
2 changed files with 36 additions and 21 deletions
|
|
@ -207,7 +207,7 @@ func SearchRefBlock(id, rootID, keyword string, beforeLen int, isSquareBrackets
|
|||
return
|
||||
}
|
||||
|
||||
func FindReplace(keyword, replacement string, ids []string, method int) (err error) {
|
||||
func FindReplace(keyword, replacement string, 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 {
|
||||
err = errors.New(Conf.Language(132))
|
||||
|
|
@ -232,6 +232,13 @@ func FindReplace(keyword, replacement string, ids []string, method int) (err err
|
|||
return
|
||||
}
|
||||
|
||||
if 1 > len(ids) {
|
||||
blocks, _, _, _ := FullTextSearchBlock(keyword, boxes, paths, types, method, orderBy, groupBy, 1)
|
||||
for _, block := range blocks {
|
||||
ids = append(ids, block.ID)
|
||||
}
|
||||
}
|
||||
|
||||
for _, id := range ids {
|
||||
bt := treenode.GetBlockTree(id)
|
||||
if nil == bt {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue