highlightText
consthighlightText: (text,ref) =>string
Defined in: prism/core.d.ts:149
High level utility that tokenizes the code using tokenizeText and then highlights the TokenStream using highlightTokens.
Parameters
Section titled “Parameters”string
A string with the code to be highlighted.
Either a grammar object or a language name used to index languages. The resolved grammar is then used to highlight the text.
Grammar | string
Returns
Section titled “Returns”string