mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 08:46:55 +08:00
1 parent
151ddb0a20
commit
d97c6f4e6f
60 files changed
+570
-262
No files matched your search
@@ -396,19 +396,19 @@ func editorBookmarkDefinition(data []byte, name string, next *Bookmark, add bool
|
||||
}
|
||||
container := root.child("Bookmarks")
|
||||
if add {
|
||||
context := container
|
||||
if context == nil {
|
||||
context = root
|
||||
ctx := container
|
||||
if ctx == nil {
|
||||
ctx = root
|
||||
}
|
||||
attrs, err := next.Dest.attributes()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
dest, err := context.containerXML("Dest", attrs, nil)
|
||||
dest, err := ctx.containerXML("Dest", attrs, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
item, err := context.containerXML("Bookmark", ofdAttrs{{Name: xml.Name{Local: "Name"}, Value: next.Name}}, dest)
|
||||
item, err := ctx.containerXML("Bookmark", ofdAttrs{{Name: xml.Name{Local: "Name"}, Value: next.Name}}, dest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user