Skip to content

CodeMirrorEditor.scanForBracket method

CodeMirrorEditor › scanForBracket

Unofficial

Scan for a bracket from the given position in the specified direction.

Signature:

scanForBracket(from: EditorPosition, direction: number, style?: string | undefined): Bracket | null

Parameters:

ParameterTypeDescription
fromEditorPositionThe position to start scanning from.
directionnumberThe direction to scan (positive for forward, negative for backward).
style?string | undefinedThe style filter for brackets.

Returns: Bracket | nullThe found bracket, or null if none was found.