mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 14:31:12 +08:00
This commit is contained in:
1 parent
ee48ca666d
commit
4a6174c2ae
12 files changed
+1249
-101
No files matched your search
@@ -159,6 +159,22 @@ func (e *Editor) sourceParts() (map[string][]byte, error) {
|
||||
}
|
||||
parts["OFD.xml"] = data
|
||||
}
|
||||
if e.outlines != nil {
|
||||
name := reader.ResPath(reader.OFD.DocBody[0].DocRoot)
|
||||
data, ok := parts[name]
|
||||
if !ok {
|
||||
var err error
|
||||
data, err = reader.readFile(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
updated, err := e.withOutlines(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
parts[name] = updated
|
||||
}
|
||||
if err := e.prunePageReferences(parts); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user