API reference
lib/tanstack-highlight
Import
Section titled “Import”import * as api from "@fungi.computer/caps/lib/tanstack-highlight";Exports
Section titled “Exports”| Kind | Export | Description |
|---|---|---|
| constant | highlightMarkdownCode | Highlights Markdown fences with the shared chat and document language set. |
| function | highlightToHtml() | Converts source code to escaped token spans for a code display. |
highlightMarkdownCodeconstant
Section titled “highlightMarkdownCode”const highlightMarkdownCode: TanStackMarkdownHighlighter;Highlights Markdown fences with the shared chat and document language set.
highlightToHtml()function
Section titled “highlightToHtml()”function highlightToHtml(code, lang?): string;Converts source code to escaped token spans for a code display.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
code |
string |
lang? |
string |
Returns
Section titled “Returns”string