A map describing the deletions and insertions made by a step, which can be used to find the correspondence between positions in the pre-step version of a document and the same position in the post-step version.
Ports StepMap from prosemirror-transform/src/map.ts.
Summary
Functions
A StepMap that contains no changed ranges.
Calls the given function on each of the changed ranges included in this map. The function receives (old_start, old_end, new_start, new_end). Returns a list of the results.
Create an inverted version of this map. The result can be used to map positions in the post-step document to the pre-step document.
Create a map that moves all positions by offset n (which may be negative).
Types
@type t() :: %ProsemirrorEx.Transform.StepMap{ inverted: boolean(), ranges: [non_neg_integer()] }
Functions
A StepMap that contains no changed ranges.
Calls the given function on each of the changed ranges included in this map. The function receives (old_start, old_end, new_start, new_end). Returns a list of the results.
Create an inverted version of this map. The result can be used to map positions in the post-step document to the pre-step document.
Create a map that moves all positions by offset n (which may be negative).