SETL-Framework/setl

Mermaid diagram improvement

Closed this issue · 1 comments

Is your feature request related to a problem? Please describe.
Improve the print of mermaid code and generate url of Mermaid live editor. Basically is to encode the code with the following format with the base64URL scheme:

{"code": "...","mermaid":{"theme":"default"}}

Describe the solution you'd like
Expected result in the console:

[Other logs...]

--------- MERMAID DIAGRAM ---------
classDiagram
class MyFactory {
  <<Factory[Dataset[TestObject]]>>
  +SparkRepository[TestObject]
}
------- END OF MERMAID CODE -------

You can copy the previous code to a markdown viewer that supports Mermaid. 

Or you can try the live editor: https://mermaid-js.github.io/mermaid-live-editor/#/edit/{BASE64_OF_YOUR_DIAGRAM}

close with #55 #56