MermaidRenderer

Blocking, reusable Mermaid-to-SVG renderer.

Implementations are thread-safe. Callers own the renderer and must close it when it is no longer needed. Closing an already closed renderer is a no-op; rendering after close fails with IllegalStateException.

Functions

Link copied to clipboard
abstract fun close()
Link copied to clipboard
abstract fun renderSvg(source: String): String

Renders source with the backend's default options.

abstract fun renderSvg(source: String, options: MermaidRenderOptions): String

Renders source with portable options supported by every backend.