mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-22 08:16:10 +01:00
🎨 Add configuration item Editor - [[ Only search doc block Fix https://github.com/siyuan-note/siyuan/issues/8077
This commit is contained in:
parent
d4806332a3
commit
99407dcc1c
8 changed files with 22 additions and 11 deletions
|
|
@ -191,11 +191,16 @@ func searchRefBlock(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
isSquareBrackets := false
|
||||
if isSquareBracketsArg := arg["isSquareBrackets"]; nil != isSquareBracketsArg {
|
||||
isSquareBrackets = isSquareBracketsArg.(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, isSquareBrackets)
|
||||
ret.Data = map[string]interface{}{
|
||||
"blocks": blocks,
|
||||
"newDoc": newDoc,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue