mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50: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
|
|
@ -56,7 +56,11 @@ func getBackmentionDoc(c *gin.Context) {
|
|||
if val, ok := arg["containChildren"]; ok {
|
||||
containChildren = val.(bool)
|
||||
}
|
||||
backlinks := model.GetBackmentionDoc(defID, refTreeID, keyword, containChildren)
|
||||
highlight := true
|
||||
if val, ok := arg["highlight"]; ok {
|
||||
highlight = val.(bool)
|
||||
}
|
||||
backlinks := model.GetBackmentionDoc(defID, refTreeID, keyword, containChildren, highlight)
|
||||
ret.Data = map[string]interface{}{
|
||||
"backmentions": backlinks,
|
||||
}
|
||||
|
|
@ -78,7 +82,11 @@ func getBacklinkDoc(c *gin.Context) {
|
|||
if val, ok := arg["containChildren"]; ok {
|
||||
containChildren = val.(bool)
|
||||
}
|
||||
backlinks := model.GetBacklinkDoc(defID, refTreeID, keyword, containChildren)
|
||||
highlight := true
|
||||
if val, ok := arg["highlight"]; ok {
|
||||
highlight = val.(bool)
|
||||
}
|
||||
backlinks := model.GetBacklinkDoc(defID, refTreeID, keyword, containChildren, highlight)
|
||||
ret.Data = map[string]interface{}{
|
||||
"backlinks": backlinks,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue