mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
This commit is contained in:
parent
85f68e9817
commit
943f4d7792
1 changed files with 12 additions and 0 deletions
|
|
@ -86,6 +86,18 @@ func searchEmbedBlock(stmt string, excludeIDs []string, headingMode int) (ret []
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 添加笔记本名称
|
||||||
|
var boxIDs []string
|
||||||
|
for _, embedBlock := range ret {
|
||||||
|
boxIDs = append(boxIDs, embedBlock.Block.Box)
|
||||||
|
}
|
||||||
|
boxIDs = gulu.Str.RemoveDuplicatedElem(boxIDs)
|
||||||
|
boxNames := Conf.BoxNames(boxIDs)
|
||||||
|
for _, embedBlock := range ret {
|
||||||
|
name := boxNames[embedBlock.Block.Box]
|
||||||
|
embedBlock.Block.HPath = name + embedBlock.Block.HPath
|
||||||
|
}
|
||||||
|
|
||||||
if 1 > len(ret) {
|
if 1 > len(ret) {
|
||||||
ret = []*EmbedBlock{}
|
ret = []*EmbedBlock{}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue