mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 Improve search highlighting https://github.com/siyuan-note/siyuan/issues/13343
This commit is contained in:
parent
4b3f95e4bf
commit
c1fd34f57b
6 changed files with 32 additions and 14 deletions
|
|
@ -1061,8 +1061,14 @@ func getDoc(c *gin.Context) {
|
|||
if nil != isBacklinkArg {
|
||||
isBacklink = isBacklinkArg.(bool)
|
||||
}
|
||||
highlightArg := arg["highlight"]
|
||||
highlight := true
|
||||
if nil != highlightArg {
|
||||
highlight = highlightArg.(bool)
|
||||
}
|
||||
|
||||
blockCount, content, parentID, parent2ID, rootID, typ, eof, scroll, boxID, docPath, isBacklinkExpand, err := model.GetDoc(startID, endID, id, index, query, queryTypes, queryMethod, mode, size, isBacklink)
|
||||
blockCount, content, parentID, parent2ID, rootID, typ, eof, scroll, boxID, docPath, isBacklinkExpand, err :=
|
||||
model.GetDoc(startID, endID, id, index, query, queryTypes, queryMethod, mode, size, isBacklink, highlight)
|
||||
if model.ErrBlockNotFound == err {
|
||||
ret.Code = 3
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue