🐛 修改命名文档块后引用动态锚文本未跟随 https://github.com/siyuan-note/siyuan/issues/6398

This commit is contained in:
Liang Ding 2022-10-29 23:51:34 +08:00
parent a6e9199d88
commit 7f75903475
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
2 changed files with 7 additions and 1 deletions

View file

@ -179,6 +179,12 @@ func ResetBlockAttrs(id string, nameValues map[string]string) (err error) {
}
}
if ast.NodeDocument == node.Type {
// 修改命名文档块后引用动态锚文本未跟随 https://github.com/siyuan-note/siyuan/issues/6398
// 使用重命名文档队列来刷新引用锚文本
updateRefTextRenameDoc(tree)
}
if err = indexWriteJSONQueue(tree); nil != err {
return
}

View file

@ -1235,7 +1235,7 @@ func RenameDoc(boxID, p, title string) (err error) {
util.PushEvent(evt)
box.renameSubTrees(tree)
go updateRefTextRenameDoc(tree)
updateRefTextRenameDoc(tree)
IncSync()
return
}