Skip to content

Feature Request: Support for Mermaid diagrams #45

@hamigakitanuki

Description

@hamigakitanuki

Is your feature request related to a problem? Please describe.
As a developer who frequently uses Mermaid diagrams for system architecture and flowcharts in my Markdown files, I would love to be able to view them or have them parsed nicely within treemd. Currently, Mermaid blocks are just treated as standard code blocks.

Describe the solution you'd like
I would like treemd to support rendering or better handling of Mermaid diagrams (```mermaid).
Since treemd is a TUI tool, I understand that graphical rendering can be challenging, but here are a few possibilities:

  1. Render Mermaid diagrams into text/ASCII art formats if possible.
  2. Provide a specific syntax highlighting for Mermaid diagram codes.
  3. Support terminal image protocols (like Sixel or Kitty image protocol) to render the diagrams natively in supported terminals.

Describe alternatives you've considered
Opening the markdown file in a web browser or using GUI-based markdown editors (like Obsidian or VSCode) just to check the Mermaid diagrams, which breaks the seamless terminal workflow that treemd provides.

Additional context
I noticed that the roadmap includes Obsidian Flavored Markdown (callouts). Since Mermaid is highly utilized in Obsidian and other modern markdown tools, supporting it would be an excellent addition to treemd.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions