Skip to content

rainbowBrackets

rainbowBrackets(pairs): (tokens) => void

Defined in: ssr/brackets.ts:66

Function that runs the same bracket matching algorithm as the matchBrackets extension. This is useful to add rainbow brackets outside an editor or with renderEditor.

string = "()[]{}"

Which characters to match together. The opening character must be followed by the corresponding closing character. Defaults to "()[]{}".

A function that accepts a token stream and adds extra classes to the brackets.

(tokens): void

TokenStream

void