mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-15 15:28:37 +08:00
🐛 Regular expression search does not work with single quotes https://github.com/siyuan-note/siyuan/issues/14940
This commit is contained in:
parent
572baa99bd
commit
669b2884b1
@ -1900,6 +1900,7 @@ func maxContent(content string, maxLen int) string {
|
||||
}
|
||||
|
||||
func fieldRegexp(regexp string) string {
|
||||
regexp = strings.ReplaceAll(regexp, "'", "''") // 不需要转义双引号,因为条件都是通过单引号包裹的,只需要转义单引号即可
|
||||
buf := bytes.Buffer{}
|
||||
buf.WriteString("(")
|
||||
buf.WriteString("content REGEXP '")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user