Skip to content

Commit

Permalink
docs: update sequenceDiagram.md to include line break (mermaid-js#3960)
Browse files Browse the repository at this point in the history
Included an example for adding a line break to notes. It seems like an issue irking a lot of (new) users

Co-authored-by: Alois Klink <[email protected]>
Co-authored-by: Chidozie Nnachor <[email protected]>
  • Loading branch information
3 people authored Jan 7, 2023
1 parent ae7833b commit 568a332
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/syntax/sequenceDiagram.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,20 @@ sequenceDiagram
Note over Alice,John: A typical interaction
```

It is also possible to add a line break (applies to text input in general):

```mermaid-example
sequenceDiagram
Alice->John: Hello John, how are you?
Note over Alice,John: A typical interaction<br/>But now in two lines
```

```mermaid
sequenceDiagram
Alice->John: Hello John, how are you?
Note over Alice,John: A typical interaction<br/>But now in two lines
```

## Loops

It is possible to express loops in a sequence diagram. This is done by the notation
Expand Down
8 changes: 8 additions & 0 deletions packages/mermaid/src/docs/syntax/sequenceDiagram.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,14 @@ sequenceDiagram
Note over Alice,John: A typical interaction
```

It is also possible to add a line break (applies to text input in general):

```mermaid-example
sequenceDiagram
Alice->John: Hello John, how are you?
Note over Alice,John: A typical interaction<br/>But now in two lines
```

## Loops

It is possible to express loops in a sequence diagram. This is done by the notation
Expand Down

0 comments on commit 568a332

Please sign in to comment.