Mermaid - Generation of diagrams and flowcharts from text in a similar manner as markdown

You forgot my proposal :wink:

Proposals: Syntax and Semantics

explicit “show code” semantics explicit “execute code” semantics non-explicit, do what is usually expected / most natural
A mermaid !mermaid
B mermaid draw:mermaid
C mermaid_src mermaid
D mermaid = mermaid () or
mermaid ( … )
mermaid
  • A: not bad, but breaks existing things, and “rare case should not “poison” major cases”

  • B: readable, but uses English, and same problems as A

  • C: reflects usage frequency, but then some users will naturally start using markdown_src and even javascript_src, so those should be supported. Also, for those things like javascript and markdown that by default are “show code”, how do you say “execute code”? Will we then add markdown_draw? If we do, we’ve ended up doing D, but not as nicely.

  • D: semantics of non-explicit form reflects usage frequency. Author can always choose to be explicit. Is consistent and logical (semantic explicitness in both cases is syntactically explicit). Does not use English. Tokens make sense. Uses second token rather than modding the first, so more backward compatible, degrades gracefully in vast majority of cases.

2 Likes