question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

shouldn't mermaid become more like Markdown ?

See original GitHub issue

This is why mermaid was born, a simple markdown-like script language for generating charts from text via javascript.

A look at Markdown’s key objective:

The overriding design goal for Markdown’s formatting syntax is to make it as readable as possible. The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions.

Maybe mermaid could inspire itself from this by making its text syntax look more like the final outcome rendered via javascript.

E.g. for graphs, a consequence could be to also allow:

graph:
  A
  |
  .
  B
 / \
.   .
C   D

which would be visually more appealing than:

graph TB;
  A-->B;
  B-->C;
  B-->D;

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
sancarncommented, Nov 27, 2016

As far as I am aware, the point of systems like Mermaid or Viz, isn’t that the initial product should be visually appealing but that the initial product is easy for a computer to produce.

Ultimately, Viz and Mermaid are tools for automating the production of charts from data. In the end if you want something visually appealing why not just build it in a flowchart maker like draw.io?

An example use case of these graphers: Say you have an object oriented program and you want to visualise the entire object structure to search for optimisations. It’s far easier to write a program to search the code and turn it into:

object1-->object2
object2-->object3
object3-->object4
object3-->object5
object2-->object6
object1-->object7

Than it would be for the computer to produce something like:

            object1
             /  \
             .   .
       object2  object7
         /  \
         .   .
   object3  object6
     /  \
     .   .
object4  object5

Edit: And even after editing the comment multiple times even I can’t get the formatting correct…

2reactions
wigy-opensource-developercommented, Jul 13, 2017

I cannot agree with the proposal. I think tools like mermaid also help people just typing out a specification of a diagram and leave the representation to be calculated based on rules. Small changes in the specification could end up producing big changes in the diagram (one arrow or adding a day to a task on a Gantt-chart).

For me it seems more natural to keep the specification under version control, see the small diff between versions and leave the formatting and rendering to the software.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What would need to be updated to support mermaid diagrams ...
I was recently asked about DocC in the context of adding in a ... to be updated to support mermaid diagrams in the...
Read more >
Include diagrams in your Markdown files with Mermaid
Whereas something like Mermaid is intended to be meaningful both as code and as rendered output, just like Markdown itself.
Read more >
Can I control the direction of flowcharts in Mermaid?
I like to draw simple diagram using Mermaid. But it seems that flowcharts can only be top-to-bottom or left-to-right . Can I have...
Read more >
Mermaid Diagrams not Properly Rendering in Snippets - GitLab
We cannot use a rich type because the mermaids blocks can be used inside regular markdown fields. At the moment, the BE returns...
Read more >
Please implement Mermaid markdown live preview - Jira
This would be mega useful as I like having diagrams in my repo as much as possible rather than having to go to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found