Unclear on what gapTo/gapFrom mean on a ReplaceAroundStep


#1

Hi!

I’m trying to discern the meaning of the gapTo and gapFrom attributes of the ReplaceAroundStep. The signature is

new ReplaceAroundStep(from: number, to: number, gapFrom: number, gapTo: number, slice: Slice, insert: number, structure: ?⁠bool)

And the docs reference the ReplaceStep class, but that class doesn’t have a gapTo or gapFrom. Reading about ReplaceAroundStep makes me think that this explains how many open/close tag pairs to skip when trying to find the “end” of the ReplaceAroundStep, but I’m unsure.


#2

A ReplaceAroundStep is a replace step that leaves part of the content between from and to (namely the content between gapFrom and gapTo) intact.


#3

D’oh thank you!