Ox Content

mermaid.ts

Source

getTextContent

function

Extract text content from a hast node.

Source

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.

Source

function rehypeMermaid()

transformMermaid

function

Transform mermaid code blocks in HTML. Creates wrapper elements that can be rendered client-side by the mermaid runtime.

Source

export async function transformMermaid(html: string): Promise<string>

Returns

Promise<string> -