🎨 文档树支持 Ctrl+ClickShift+↑/↓ 进行多选 https://github.com/siyuan-note/siyuan/issues/1359

This commit is contained in:
Liang Ding 2022-11-04 21:37:10 +08:00
parent 47a8b0c050
commit e3a6bb2251
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
4 changed files with 55 additions and 0 deletions

View file

@ -962,6 +962,25 @@ func GetHPathByPath(boxID, p string) (hPath string, err error) {
return
}
func GetHPathsByPaths(paths []string) (hPaths []string, err error) {
pathsBoxes := getBoxesByPaths(paths)
for p, box := range pathsBoxes {
if nil == box {
logging.LogWarnf("box not found by path [%s]", p)
continue
}
bt := treenode.GetBlockTreeByPath(p)
if nil == bt {
logging.LogWarnf("block tree not found by path [%s]", p)
continue
}
hPaths = append(hPaths, box.Name+bt.HPath)
}
return
}
func GetHPathByID(id string) (hPath string, err error) {
tree, err := loadTreeByBlockID(id)
if nil != err {