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.
Parameters
Section titled “Parameters”string
= "()[]{}"
Which characters to match together. The opening character must be followed
by the corresponding closing character. Defaults to "()[]{}"
.
Returns
Section titled “Returns”A function that accepts a token stream and adds extra classes to the brackets.
(
tokens
):void
Parameters
Section titled “Parameters”tokens
Section titled “tokens”Returns
Section titled “Returns”void