From 568a3329e13b3b0cf9335af84c87de73d941804c Mon Sep 17 00:00:00 2001 From: Chidozie Nnachor Date: Sun, 8 Jan 2023 00:39:36 +0100 Subject: [PATCH] docs: update sequenceDiagram.md to include line break (#3960) 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 Co-authored-by: Chidozie Nnachor --- docs/syntax/sequenceDiagram.md | 14 ++++++++++++++ .../mermaid/src/docs/syntax/sequenceDiagram.md | 8 ++++++++ 2 files changed, 22 insertions(+) diff --git a/docs/syntax/sequenceDiagram.md b/docs/syntax/sequenceDiagram.md index ad88249be..f4f4486ee 100644 --- a/docs/syntax/sequenceDiagram.md +++ b/docs/syntax/sequenceDiagram.md @@ -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
But now in two lines +``` + +```mermaid +sequenceDiagram + Alice->John: Hello John, how are you? + Note over Alice,John: A typical interaction
But now in two lines +``` + ## Loops It is possible to express loops in a sequence diagram. This is done by the notation diff --git a/packages/mermaid/src/docs/syntax/sequenceDiagram.md b/packages/mermaid/src/docs/syntax/sequenceDiagram.md index 9c28883c9..facb43a49 100644 --- a/packages/mermaid/src/docs/syntax/sequenceDiagram.md +++ b/packages/mermaid/src/docs/syntax/sequenceDiagram.md @@ -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
But now in two lines +``` + ## Loops It is possible to express loops in a sequence diagram. This is done by the notation