Function positionToGlobal

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

    Parameters

    • position: Position

      The position to modify.

    • context: DocumentContext

      The context of the document.

    Returns Position

    The modified position.