Skip to main content

Module: processTargets/modifiers/surroundingPair/extractSelectionFromSurroundingPairOffsets

Interfaces

Functions

extractSelectionFromSurroundingPairOffsets

extractSelectionFromSurroundingPairOffsets(document, baseOffset, surroundingPairOffsets): SurroundingPairInfo

Given offsets describing a surrounding pair, returns a selection

Parameters

NameTypeDescription
documentTextDocumentThe document containing the pairs
baseOffsetnumberThe base offset to be added to all given offsets
surroundingPairOffsetsSurroundingPairOffsetsA pair of start/end offsets corresponding to a delimiter pair

Returns

SurroundingPairInfo

A selection corresponding to the delimiter pair

Defined in

processTargets/modifiers/surroundingPair/extractSelectionFromSurroundingPairOffsets.ts:19