Highlight a string passed as argument and return it
The code
The language of the code
Optional
If it is multiline, it will add a wrapper for the line numbering and header
Customization options
The highlighted string
elm.innerHTML = await highlightText(code, 'js'); Copy
elm.innerHTML = await highlightText(code, 'js');
highlightText
Highlight a string passed as argument and return it