Documentation
¶
Index ¶
- func Background(theme string) string
- func DiagramPage(source, theme string) ([]byte, error)
- func Render(source []byte, format Format, theme string) ([]byte, error)
- func RenderWith(source []byte, format Format, theme string, options Options) ([]byte, error)
- func ThemeOf(tuiTheme string) string
- func Themes() []string
- func WriteFile(destination string, content []byte) error
- type Format
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Background ¶
Background is a theme's page colour; dark's for a theme it does not have.
func DiagramPage ¶ added in v0.1.11
DiagramPage is a page of one Mermaid diagram, drawn at its own size on the theme's background: for a preview, which renders it whole and scrolls it.
func RenderWith ¶ added in v0.1.15
Types ¶
type Options ¶ added in v0.1.15
type Options struct {
// Base is the directory the source's relative links are read from: each becomes the file: URL
// of the file it names there, so the page's links reach their files wherever it is written. ""
// writes every link as the source has it.
Base string
// SourceSpans puts each block element's source bytes on it (data-src="start-end"), for a
// view that follows the editor: the GUI's native HTML preview scrolls to the cursor's block.
SourceSpans bool
}
Options are what a render reads besides the source, its format and its theme.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package mermaid is mermaid.js, vendored: the diagrams a page draws from its ```mermaid blocks, drawn as the Mermaid project draws them.
|
Package mermaid is mermaid.js, vendored: the diagrams a page draws from its ```mermaid blocks, drawn as the Mermaid project draws them. |
Click to show internal directories.
Click to hide internal directories.