mermaid.ts
getTextContent
function
Extract text content from a hast node.
function getTextContent(node: Element | Root): string
Returns
string -
rehypeMermaid
function
Rehype plugin to transform mermaid code blocks.
Replaces `mermaid blocks with a wrapper element
that can be rendered client-side.
function rehypeMermaid()
transformMermaid
function
Transform mermaid code blocks in HTML. Creates wrapper elements that can be rendered client-side by the mermaid runtime.
export async function transformMermaid(html: string): Promise<string>
Returns
Promise<string> -