feat(编辑字体): 优化多文档及版本字体清理
build.yaml / build (push) Successful in 47s

This commit is contained in:
xiaoqidun committed 2026-10-11 20:38:07 +08:00
1 parent 8864f6c7ba
commit 2e3809179b
3 files changed
+43 -13

No files matched your search

+10
View File
@@ -109,6 +109,16 @@ func (r *Reader) documentVersionEntriesContext(ctx context.Context) ([]DocumentV
if body == nil {
return nil, fmt.Errorf("document body not found: %d", r.documentIndex)
}
return parseVersionEntries(ctx, body)
}
// parseVersionEntries 校验一个文档的版本列表,复用已解析的主入口节点
// 入参: ctx 取消上下文, body 文档入口节点
// 返回: []DocumentVersionInfo 版本入口属性, error 结构或取消错误
func parseVersionEntries(ctx context.Context, body *editorXML) ([]DocumentVersionInfo, error) {
if err := ctx.Err(); err != nil {
return nil, err
}
versions := body.child("Versions")
if versions == nil {
return nil, nil