Add missing code listing in sequence diagram docs

This commit is contained in:
Kah Goh 2021-11-08 21:56:22 +08:00
parent c29c8bd33c
commit 6f4fb48fad
No known key found for this signature in database
GPG Key ID: E8830EE92D21DE13
1 changed files with 44 additions and 0 deletions

View File

@ -305,6 +305,17 @@ end
See the example below:
```
sequenceDiagram
par Alice to Bob
Alice->>Bob: Hello guys!
and Alice to John
Alice->>John: Hello guys!
end
Bob-->>Alice: Hi Alice!
John-->>Alice: Hi Alice!
```
```mermaid
sequenceDiagram
par Alice to Bob
@ -318,6 +329,20 @@ sequenceDiagram
It is also possible to nest parallel blocks.
```
sequenceDiagram
par Alice to Bob
Alice->>Bob: Go help John
and Alice to John
Alice->>John: I want this done today
par John to Charlie
John->>Charlie: Can we do this today?
and John to Diana
John->>Diana: Can you help us today?
end
end
```
```mermaid
sequenceDiagram
par Alice to Bob
@ -352,6 +377,25 @@ end
See the examples below:
```
sequenceDiagram
participant Alice
participant John
rect rgb(191, 223, 255)
note right of Alice: Alice calls John.
Alice->>+John: Hello John, how are you?
rect rgb(200, 150, 255)
Alice->>+John: John, can you hear me?
John-->>-Alice: Hi Alice, I can hear you!
end
John-->>-Alice: I feel great!
end
Alice ->>+ John: Did you want to go to the game tonight?
John -->>- Alice: Yeah! See you there.
```
```mermaid
sequenceDiagram
participant Alice