mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
🎨 虚拟引用和反链提及大小写敏感遵循搜索设置 Fix https://github.com/siyuan-note/siyuan/issues/6181
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user