pub(crate) fn resolved_to_original(
offset: usize,
substitutions: &[Substitution],
) -> usizeExpand description
Map a byte offset in resolved text back to the corresponding offset in original text.
Walks substitutions in order, tracking the cumulative delta between original
and resolved positions. If offset falls before the next substitution in resolved
space, applies the running delta. If inside a substitution’s resolved span, clamps
to that substitution’s original start. Otherwise continues accumulating delta.