Helper function to modify a range based on the context of the document. Returns range relative to the global document when the context is an embedded section, otherwise returns the range as is.
The range to modify.
The context of the document.
The modified range.
Helper function to modify a range based on the context of the document. Returns range relative to the global document when the context is an embedded section, otherwise returns the range as is.