mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-28 20:38:49 +01:00
🎨 Content type filtering when inserting reference links via ((, [[ https://github.com/siyuan-note/siyuan/issues/8009
This commit is contained in:
parent
b13398cbdd
commit
c316951592
3 changed files with 23 additions and 8 deletions
|
|
@ -191,11 +191,16 @@ func searchRefBlock(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
onlyDoc := false
|
||||
if nil != arg["onlyDoc"] {
|
||||
onlyDoc = arg["onlyDoc"].(bool)
|
||||
}
|
||||
|
||||
rootID := arg["rootID"].(string)
|
||||
id := arg["id"].(string)
|
||||
keyword := arg["k"].(string)
|
||||
beforeLen := int(arg["beforeLen"].(float64))
|
||||
blocks, newDoc := model.SearchRefBlock(id, rootID, keyword, beforeLen)
|
||||
blocks, newDoc := model.SearchRefBlock(id, rootID, keyword, beforeLen, onlyDoc)
|
||||
ret.Data = map[string]interface{}{
|
||||
"blocks": blocks,
|
||||
"newDoc": newDoc,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue