mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-02 21:50:36 +08:00
🐛 搜索指定路径参数解析异常 Fix https://github.com/siyuan-note/siyuan/issues/6983
This commit is contained in:
parent
5e1d539719
commit
7690ca7c05
@ -201,11 +201,15 @@ func fullTextSearchBlock(c *gin.Context) {
|
||||
if nil != pathsArg {
|
||||
for _, p := range pathsArg.([]interface{}) {
|
||||
path := p.(string)
|
||||
box := strings.Split(path, "/")[0]
|
||||
box := strings.TrimSpace(strings.Split(path, "/")[0])
|
||||
if "" != box {
|
||||
boxes = append(boxes, box)
|
||||
path = strings.TrimPrefix(path, box)
|
||||
}
|
||||
path = strings.TrimSpace(strings.TrimPrefix(path, box))
|
||||
if "" != path {
|
||||
paths = append(paths, path)
|
||||
}
|
||||
}
|
||||
paths = gulu.Str.RemoveDuplicatedElem(paths)
|
||||
boxes = gulu.Str.RemoveDuplicatedElem(boxes)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user