mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 虚拟引用和反链提及大小写敏感遵循搜索设置 Fix https://github.com/siyuan-note/siyuan/issues/6181
This commit is contained in:
parent
aa094e549d
commit
2c610c2bad
2 changed files with 20 additions and 9 deletions
|
|
@ -195,7 +195,11 @@ func QueryBlockDefIDsByRefText(refText string, excludeIDs []string) (ret []strin
|
|||
func queryDefIDsByDefText(keyword string, excludeIDs []string) (ret []string) {
|
||||
ret = []string{}
|
||||
notIn := "('" + strings.Join(excludeIDs, "','") + "')"
|
||||
rows, err := query("SELECT DISTINCT(def_block_id) FROM refs WHERE content = ? AND def_block_id NOT IN "+notIn, keyword)
|
||||
q := "SELECT DISTINCT(def_block_id) FROM refs WHERE content LIKE ? AND def_block_id NOT IN " + notIn
|
||||
if caseSensitive {
|
||||
q = "SELECT DISTINCT(def_block_id) FROM refs WHERE content = ? AND def_block_id NOT IN " + notIn
|
||||
}
|
||||
rows, err := query(q, keyword)
|
||||
if nil != err {
|
||||
logging.LogErrorf("sql query failed: %s", err)
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue