Module Mermaid_extension.Mermaid_handlerSource

Sourceval prefix : string

The language prefix this extension handles. E.g., "dot" handles {@dot[...]}, "mermaid" handles {@mermaid[...]}

Transform a code block. Takes metadata and code content. Returns Some output to replace the code block, or None to fall back to default rendering.

Example metadata for {@dot width=500 format=svg[digraph {...}]}:

  • meta.language = "dot"
  • meta.tags = [`Binding ("width", "500"); `Binding ("format", "svg")]
  • content = "digraph ..."