Micromaid is a small subset of Mermaid for Pharo 13 and later.
Clone github repository with tomooda
/ Micromaid
.
EpMonitor disableDuring: [
Metacello new
onConflictUseLoaded;
onWarningLog;
repository: 'github://tomooda/Micromaid:main/';
baseline: 'Micromaid';
load ]
The following is the REPL flowchart embedded as a mermaid script.
flowchart TD
R[Read]
E[Eval]
P[Print]
A([Init]) --> R
R --> E
E -->|quit| Q([quit])
E --> P
P --> R
On Pharo, you can view this document like the below.
You can embed a micromaid script in Microdown documents, including class comments. For example, if your class has a comment as below,
I am a REPL interpreter.
```mermaid
flowchart TD
R[Read]
E[Eval]
P[Print]
A([Init]) --> R
R --> E
E -->|quit| Q([quit])
E --> P
P --> R
```
you'll have the following presentation on the browser.
MicromaidLiveEditorPresenter
provides the following UI for live authoring.
The diagram on the right will be update as you type in the left source pane.
Subsets of the following diagrams from mermaid are supported in Micromaid.