charmbracelet / glow

Render markdown on the CLI, with pizzazz! 💅🏻
MIT License
16.03k stars 347 forks source link

Support for mermaid, to render flow diagrams #342

Open abishekmuthian opened 2 years ago

abishekmuthian commented 2 years ago

Greetings developers & contributors.

Mermaid is a flowchart diagram JS library which renders markdown into diagrams, GitHub uses it to render diagrams in the markdown files.

Adding support for mermaid in glow can add more value, Mermaid has a cli tool which might come handy for adding the support.

deicon commented 1 year ago

Is there a way to render Mermaid as ASCII Graphs ? If not, there are other options like https://metacpan.org/release/TELS/Graph-Easy-0.64/view/lib/Graph/Easy.pm and plantuml.com using command line or Rest API

vorburger commented 1 year ago

I am not sure this request makes sense.. Mermaid runs in the browser, or renders to SVG - not "text".

ook commented 1 year ago

This request get along with mermaid counterpart: https://github.com/mermaidjs/mermaid-live-editor/issues/36

Fildor commented 6 months ago

Maybe it would suffice to provide any means of rendering the most used mermaid chart types, without actually using mermaid.js - just the definition syntax? (I am aware that would probably be a project in and of itself)