mermaid + gist = success

GitHub recently added mermaid rendering to their markdown dialect, making it simple to render your diagrams, whether in a readme or just thrown together in a gist.

As soon as you create a new gist (remembering to use the .md extension, to enable preview), you can easily draw a sequence diagram:

    Alice->>John: Hello John, how are you?
    John-->>Alice: Great!
    Alice-)John: See you later!

or finite automata:

    state fork_state <<fork>>
      [*] --> fork_state
      fork_state --> State2
      fork_state --> State3

      state join_state <<join>>
      State2 --> join_state
      State3 --> join_state
      join_state --> State4
      State4 --> [*]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s