Was reading through the documentation and came across:
new ReplaceStep(from: number, to: number, slice: Slice, structure: ?bool)
The given slice should fit the ‘gap’ between from and to—the depths must line up, and the surrounding nodes must be able to be joined with the open sides of the slice. When structure is true, the step will fail if the content between from and to is not just a sequence of closing and then opening tokens (this is to guard against rebased replace steps overwriting something they weren’t supposed to).
I’m unclear what you mean by “sequence of closing and then opening tokens” - could you clear this up?
Bonus thanks if you can give a specific example of when this might occur!