mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 08:46:55 +08:00
This commit is contained in:
1 parent
225f60919b
commit
19dc79e8e3
23 files changed
+836
-289
No files matched your search
+5
-1
@@ -346,11 +346,15 @@ func (e *Editor) writeParts(write func(string, []byte, bool) error, progress edi
|
||||
// 返回: error 写入错误
|
||||
func (e *Editor) writePartsWithPages(write func(string, []byte, bool) error, progress editorProgress, includePages bool) error {
|
||||
if len(e.removedPages) != 0 {
|
||||
ctx := context.Background()
|
||||
if e.output != nil {
|
||||
ctx = e.output.ctx
|
||||
}
|
||||
output := write
|
||||
write = func(name string, data []byte, binary bool) error {
|
||||
if !binary && strings.EqualFold(path.Ext(name), ".xml") {
|
||||
var err error
|
||||
data, err = pruneCreatedPageReferences(data, e.removedPages)
|
||||
data, err = pruneCreatedPageReferences(ctx, data, e.removedPages)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user