🎨 Block ref search supports searching ' Fix https://github.com/siyuan-note/siyuan/issues/8886

This commit is contained in:
Daniel 2023-08-02 20:47:09 +08:00
parent 74a6c49f3f
commit e01077f300
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -710,7 +710,7 @@ func fullTextSearchRefBlock(keyword string, beforeLen int, onlyDoc bool) (ret []
when memo LIKE '%${keyword}%' then 90
when content LIKE '%${keyword}%' and type != 'i' and type != 'l' then 100
else 65535 end ASC, sort ASC, length ASC`
orderBy = strings.ReplaceAll(orderBy, "${keyword}", keyword)
orderBy = strings.ReplaceAll(orderBy, "${keyword}", quotedKeyword)
stmt += orderBy + " LIMIT " + strconv.Itoa(Conf.Search.Limit)
blocks := sql.SelectBlocksRawStmtNoParse(stmt, Conf.Search.Limit)
ret = fromSQLBlocks(&blocks, "", beforeLen)