🎨 Refresh the data in the interface after moving the document https://github.com/siyuan-note/siyuan/issues/15762

Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2025-09-10 21:39:14 +08:00
parent d5e7b27a11
commit ee4ddf89c1
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
6 changed files with 39 additions and 23 deletions

View file

@ -206,6 +206,12 @@ func DocIAL(absPath string) (ret map[string]string) {
return
}
func TreeSize(tree *parse.Tree) (size uint64) {
luteEngine := util.NewLute() // 不关注用户的自定义解析渲染选项
renderer := render.NewJSONRenderer(tree, luteEngine.RenderOptions)
return uint64(len(renderer.Render()))
}
func WriteTree(tree *parse.Tree) (size uint64, err error) {
data, filePath, err := prepareWriteTree(tree)
if err != nil {