Class: SurroundingPairStage
processTargets/modifiers/SurroundingPairStage.SurroundingPairStage
Applies the surrounding pair modifier to the given selection. First looks to see if the target is itself adjacent to or contained by a modifier token. If so it will expand the selection to the opposite delimiter token. Otherwise, or if the opposite token wasn't found, it will proceed by finding the smallest pair of delimiters which contains the selection.
param
Context to be leveraged by modifier
param
The selection to process
param
The surrounding pair modifier information
returns
The new selection expanded to the containing surrounding pair or
null
if none was found
Implements
Constructors
constructor
• new SurroundingPairStage(modifier
)
Parameters
Name | Type |
---|---|
modifier | SurroundingPairModifier |
Defined in
processTargets/modifiers/SurroundingPairStage.ts:25
Methods
run
▸ run(context
, target
): SurroundingPairTarget
[]
Parameters
Name | Type |
---|---|
context | ProcessedTargetsContext |
target | Target |
Returns
Implementation of
Defined in
processTargets/modifiers/SurroundingPairStage.ts:27