feat(统一输入): 统一流式输入及接口命名
build.yaml / build (push) Successful in 43s

This commit is contained in:
xiaoqidun committed 2026-10-19 08:43:50 +08:00
1 parent 151ddb0a20
commit d97c6f4e6f
60 files changed
+570 -262

No files matched your search

+3 -3
View File
@@ -66,10 +66,10 @@ func (e *Editor) SetDocumentActions(actions []Action) error {
return err
}
patch := editorXMLPatch{root.close, root.close, encoded}
context := root
ctx := root
if node := root.child("Actions"); node != nil {
patch.start, patch.end = node.start, node.end
context = node
ctx = node
} else {
for _, child := range root.children {
if child.matchesOFD(child.name.Local) && slices.Contains([]string{"VPreferences", "Bookmarks", "Annotations", "CustomTags", "Attachments", "Extensions"}, child.name.Local) {
@@ -78,7 +78,7 @@ func (e *Editor) SetDocumentActions(actions []Action) error {
}
}
}
patch.data, err = editorXMLGenerated(encoded, context.name.Space)
patch.data, err = editorXMLGenerated(encoded, ctx.name.Space)
if err != nil {
return err
}