🎨 改进块树索引

This commit is contained in:
Liang Ding 2023-02-04 10:30:55 +08:00
parent a385c64350
commit 57a3188f4c
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
2 changed files with 6 additions and 5 deletions

View file

@ -270,7 +270,7 @@ func IndexBlockTree(tree *parse.Tree) {
slice.m.Unlock()
if nil != bt {
if bt.Updated != n.IALAttr("updated") {
if bt.Updated != n.IALAttr("updated") || bt.Path != tree.Path || bt.BoxID != tree.Box || bt.HPath != tree.HPath {
children := ChildBlockNodes(n) // 需要考虑子块,因为一些操作(比如移动块)后需要同时更新子块
changedNodes = append(changedNodes, children...)
}