Expand description
Mermaid code block extraction, rendering via mmdc, and content-hash caching.
Renders mermaid diagrams as halfblock images when:
- mmdc is installed
- Terminal supports inline images (Ghostty, iTerm2, Kitty)
- NOT inside a multiplexer (tmux) which strips graphics escape sequences
Falls back to styled source code otherwise.
Structs§
- Mermaid
Block - A mermaid code block extracted from markdown.
- Mermaid
Cache - Cache and state manager for mermaid diagram rendering.
Enums§
- Image
Protocol - Which inline image protocol the terminal supports.
- Image
Support - Whether mermaid image rendering is supported in the current environment.
- Mermaid
Render State - State of a mermaid diagram render.
Functions§
- detect_
image_ support - Detect whether the current terminal environment supports inline image rendering.