A mermaid diagram manager with cache.

Implements

Constructors

Properties

_diagrams: LruCache<string, HTMLElement>
_themes: null | IThemeManager

Accessors

Methods

  • Refresh the mermaid diagrams in rendered Markdown in the document (or within the specified root element).

    RenderedMermaid widgets redraw themselves when themeChanged is emitted.

    Parameters

    • Optionalroot: ParentNode

    Returns Promise<void>

  • Post-process to ensure mermaid diagrams contain only valid SVG and XHTML.

    Parameters

    • svg: string

    Returns string