mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-30 01:27:26 +08:00
1 parent
3f797e656b
commit
91e5b57e24
43 files changed
+2018
-384
No files matched your search
@@ -430,6 +430,17 @@ func (e *Editor) adoptDocumentReader(ctx context.Context, reader *Reader) error
|
||||
if e.source != nil && e.documentRoot() == reader.documentRoot && current == version && e.Info.DocID == reader.OFD.DocBody[reader.documentIndex].DocInfo.DocID {
|
||||
source := *e.source
|
||||
source.reader = reader
|
||||
if len(e.structureRemaps) != 0 {
|
||||
tags, err := reader.CustomTagsContext(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
source.structureStarts = make(map[int]map[string]int, len(tags))
|
||||
starts := e.structureRemapStarts()
|
||||
for index := range tags {
|
||||
source.structureStarts[index] = starts
|
||||
}
|
||||
}
|
||||
e.source = &source
|
||||
} else {
|
||||
next, err := reader.EditorContext(ctx)
|
||||
|
||||
Reference in new issue
Block a user