mermaidrender

package
v1.11.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package mermaidrender renders Mermaid through optional native CLIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Find

func Find(setting, name string) (string, error)

Find resolves a global command override, auto discovery, or explicit off.

Types

type Renderer

type Renderer struct {
	// contains filtered or unexported fields
}

Renderer keeps subprocesses and a small result cache within one viewer.

func New

func New(merman, mmdr string, fonts []string) *Renderer

func (*Renderer) Available

func (r *Renderer) Available() bool

func (*Renderer) Render

func (r *Renderer) Render(ctx context.Context, source string, dark bool) ([]byte, error)

Render tries Merman, then mmdr, accepting only a bounded, decodable PNG.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL