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/7372
This commit is contained in:
parent
3739177f97
commit
411a99fb0e
1 changed files with 5 additions and 1 deletions
|
|
@ -247,7 +247,11 @@ func queryAliases() (ret []string) {
|
|||
func queryDocIDsByTitle(title string, excludeIDs []string) (ret []string) {
|
||||
ret = []string{}
|
||||
notIn := "('" + strings.Join(excludeIDs, "','") + "')"
|
||||
sqlStmt := "SELECT id FROM blocks WHERE type = 'd' AND content = ? AND id NOT IN " + notIn + " LIMIT ?"
|
||||
|
||||
sqlStmt := "SELECT id FROM blocks WHERE type = 'd' AND content LIKE ? AND id NOT IN " + notIn + " LIMIT ?"
|
||||
if caseSensitive {
|
||||
sqlStmt = "SELECT id FROM blocks WHERE type = 'd' AND content = ? AND id NOT IN " + notIn + " LIMIT ?"
|
||||
}
|
||||
rows, err := query(sqlStmt, title, 32)
|
||||
if nil != err {
|
||||
logging.LogErrorf("sql query [%s] failed: %s", sqlStmt, err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue