From d65e78f9e23f863cb3ab34717b3394877a03a29f Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Thu, 20 Jun 2024 22:15:52 +0530 Subject: [PATCH] chore: Update docs --- docs/syntax/sequenceDiagram.md | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/docs/syntax/sequenceDiagram.md b/docs/syntax/sequenceDiagram.md index a8455964e..e39e660e8 100644 --- a/docs/syntax/sequenceDiagram.md +++ b/docs/syntax/sequenceDiagram.md @@ -304,17 +304,35 @@ sequenceDiagram Note over Alice,John: A typical interaction ``` -It is also possible to add a line break (applies to text input in general): +## Line breaks + +Line break can be added to Note and Message: ```mermaid-example sequenceDiagram - Alice->John: Hello John, how are you? + 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? + Alice->John: Hello John,
how are you? + Note over Alice,John: A typical interaction
But now in two lines +``` + +Line breaks in Actor names requires aliases: + +```mermaid-example +sequenceDiagram + participant Alice as Alice
Johnson + Alice->John: Hello John,
how are you? + Note over Alice,John: A typical interaction
But now in two lines +``` + +```mermaid +sequenceDiagram + participant Alice as Alice
Johnson + Alice->John: Hello John,
how are you? Note over Alice,John: A typical interaction
But now in two lines ```