This commit is contained in:
Liang Ding 2022-10-12 11:44:04 +08:00
parent 85f68e9817
commit 943f4d7792
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -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) {
ret = []*EmbedBlock{}
}