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:

Parameter Type Description
from EditorPosition The position to start scanning from.
direction number The direction to scan (positive for forward, negative for backward).
style? string | undefined The style filter for brackets.

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