🐛 Document duplicated when creating by block reference Fix https://github.com/siyuan-note/siyuan/issues/8981

This commit is contained in:
Daniel
2023-08-16 11:34:37 +08:00
parent a516f8da2c
commit dd7679eac6

View File

@@ -112,6 +112,7 @@ func GetBlockTreeRootByPath(boxID, path string) (ret *BlockTree) {
}
func GetBlockTreeRootByHPath(boxID, hPath string) (ret *BlockTree) {
hPath = gulu.Str.RemoveInvisible(hPath)
blockTrees.Range(func(key, value interface{}) bool {
slice := value.(*btSlice)
slice.m.Lock()
@@ -128,6 +129,7 @@ func GetBlockTreeRootByHPath(boxID, hPath string) (ret *BlockTree) {
}
func GetBlockTreeRootByHPathPreferredParentID(boxID, hPath, preferredParentID string) (ret *BlockTree) {
hPath = gulu.Str.RemoveInvisible(hPath)
var roots []*BlockTree
blockTrees.Range(func(key, value interface{}) bool {
slice := value.(*btSlice)