🐛 查找替换中使用正则表达式后替换不正确 https://github.com/siyuan-note/siyuan/issues/6722

This commit is contained in:
Liang Ding 2022-11-28 17:53:41 +08:00
parent 436cab9f68
commit b1741d31de
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -545,7 +545,7 @@ func fullTextSearchByRegexp(exp, box, path, typeFilter string, beforeLen int) (r
exp = gulu.Str.RemoveInvisible(exp) exp = gulu.Str.RemoveInvisible(exp)
fieldFilter := fieldRegexp(exp) fieldFilter := fieldRegexp(exp)
stmt := "SELECT * FROM `blocks` WHERE " + fieldFilter + " AND type IN " + typeFilter stmt := "SELECT * FROM `blocks` WHERE (" + fieldFilter + ") AND type IN " + typeFilter
if "" != box { if "" != box {
stmt += " AND box = '" + box + "'" stmt += " AND box = '" + box + "'"
} }