highlight.ts
4 documented symbols. Read the signatures first, then expand each item for parameters, return types, and examples.
Reference
fngetHighlighter(theme: string | ThemeRegistration, customLangs: LanguageRegistration[] = []): Promise<Highlighter>Get or create the Shiki highlighter.
Get or create the Shiki highlighter.
Parameters
-
themestring | ThemeRegistration -
paramunknown
Returns
Promise
fngetTextContent(node: Element | Root): stringExtract text content from a hast node.
fnhighlightCode(html: string, theme: string | ThemeRegistration = "github-dark", langs: LanguageRegistration[] = []): Promise<string>Apply syntax highlighting to HTML using Shiki.
Apply syntax highlighting to HTML using Shiki.
Parameters
-
htmlstring -
paramunknown -
paramunknown
Returns
Promise