diff --git a/cypress/integration/rendering/stateDiagram.spec.js b/cypress/integration/rendering/stateDiagram.spec.js
index 0ab68713e..3e0bf1e1c 100644
--- a/cypress/integration/rendering/stateDiagram.spec.js
+++ b/cypress/integration/rendering/stateDiagram.spec.js
@@ -121,6 +121,18 @@ describe('State diagram', () => {
{}
);
});
+ it('should handle multiline notes with different line breaks', () => {
+ imgSnapshotTest(
+ `
+ stateDiagram
+ State1
+ note right of State1
+ Line1
Line2
Line3
Line4
Line5
+ end note
+ `,
+ {}
+ );
+ });
it('should render a states with descriptions including multi-line descriptions', () => {
imgSnapshotTest(
diff --git a/dist/index.html b/dist/index.html
index 4acc24c4f..9f5df50d6 100644
--- a/dist/index.html
+++ b/dist/index.html
@@ -519,45 +519,46 @@ class Class10 {
int id
size()
}
-
+
-
- classDiagram
- Class01~T~ <|-- AveryLongClass : Cool
- <<interface>> Class01
- Class03~T~ "0" *-- "0..n" Class04
- Class05 "1" o-- "many" Class06
- Class07~T~ .. Class08
- Class09 "many" --> "1" C2 : Where am i?
- Class09 "0" --* "1..n" C3
- Class09 --|> Class07
- Class07 : equals()
- Class07 : Object[] elementData
- Class01 : #size()
- Class01 : -int chimp
- Class01 : +int gorilla
- Class08 <--> C2: Cool label
- class Class10 {
- <<service>>
- int id
- size()
- }
-
+
+ classDiagram
+ Class01~T~ <|-- AveryLongClass : Cool
+ <<interface>> Class01
+ Class03~T~ "0" *-- "0..n" Class04
+ Class05 "1" o-- "many" Class06
+ Class07~T~ .. Class08
+ Class09 "many" --> "1" C2 : Where am i?
+ Class09 "0" --* "1..n" C3
+ Class09 --|> Class07
+ Class07 : equals()
+ Class07 : Object[] elementData
+ Class01 : #size()
+ Class01 : -int chimp
+ Class01 : +int gorilla
+ Class08 <--> C2: Cool label
+ class Class10 {
+ <<service>>
+ int id
+ size()
+ }
+
stateDiagram
State1
-
+
-
-
- stateDiagram
- [*] --> First
- state First {
- [*] --> second
- second --> [*]
- }
-
+
+
+
+ stateDiagram
+ [*] --> First
+ state First {
+ [*] --> second
+ second --> [*]
+ }
+
stateDiagram
State1: The state with a note
@@ -567,8 +568,14 @@ class Class10 {
end note
State1 --> State2
note left of State2 : This is the note to the left.
-
-
+
+
+ stateDiagram
+ State1
+ note right of State1
+ Line1
Line2
Line3
Line4
Line5
+ end note
+