From 04454cece04a07eca0caaf26842cdf6952985526 Mon Sep 17 00:00:00 2001 From: Guy Adler Date: Thu, 17 Feb 2022 17:22:38 +0100 Subject: [PATCH] fix: changed open and close markers as recommended chnged from `()(` and `())` to `(((` and `)))` --- cypress/integration/rendering/flowchart-v2.spec.js | 2 +- demos/flowchart.html | 2 +- docs/flowchart.md | 2 +- src/diagrams/flowchart/parser/flow-singlenode.spec.js | 6 +++--- src/diagrams/flowchart/parser/flow.jison | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cypress/integration/rendering/flowchart-v2.spec.js b/cypress/integration/rendering/flowchart-v2.spec.js index b31d501c4..10731de05 100644 --- a/cypress/integration/rendering/flowchart-v2.spec.js +++ b/cypress/integration/rendering/flowchart-v2.spec.js @@ -368,7 +368,7 @@ flowchart TD I{{red text}} -->|default style| J[/blue text/] K[\\ red text\\] -->|default style| L[/blue text\\] M[\\ red text/] -->|default style| N[blue text]; - O()(red text)() -->|default style| P()(blue text)(); + O(((red text))) -->|default style| P(((blue text))); linkStyle default color:Sienna; style A stroke:#ff0000,fill:#ffcccc,color:#ff0000; style B stroke:#0000ff,fill:#ccccff,color:#0000ff; diff --git a/demos/flowchart.html b/demos/flowchart.html index c0265baef..0ab1f6481 100644 --- a/demos/flowchart.html +++ b/demos/flowchart.html @@ -1047,7 +1047,7 @@ L1[/red text\] <-->|default style| L2[/blue text\] M1[\red text/] <-->|default style| M2[\blue text/] N1[red text] <-->|default style| N2[blue text] - O1()(red text)() <-->|default style| O2()(blue text)() + O1(((red text))) <-->|default style| O2(((blue text))) linkStyle default color:Sienna; style A1 stroke:#ff0000,fill:#ffcccc,color:#ff0000 style B1 stroke:#ff0000,fill:#ffcccc,color:#ff0000 diff --git a/docs/flowchart.md b/docs/flowchart.md index 39e54dd19..3ad8bf3a3 100644 --- a/docs/flowchart.md +++ b/docs/flowchart.md @@ -145,7 +145,7 @@ flowchart TD ```mermaid-example flowchart TD - id1()(This is the text in the circle)() + id1(((This is the text in the circle))) ``` ## Links between nodes diff --git a/src/diagrams/flowchart/parser/flow-singlenode.spec.js b/src/diagrams/flowchart/parser/flow-singlenode.spec.js index 27ca2e519..ee41a5c39 100644 --- a/src/diagrams/flowchart/parser/flow-singlenode.spec.js +++ b/src/diagrams/flowchart/parser/flow-singlenode.spec.js @@ -161,7 +161,7 @@ describe('[Singlenodes] when parsing', () => { it('should handle a single double circle node', function () { // Silly but syntactically correct - const res = flow.parser.parse('graph TD;a()(A)();'); + const res = flow.parser.parse('graph TD;a(((A)));'); const vert = flow.parser.yy.getVertices(); const edges = flow.parser.yy.getEdges(); @@ -172,7 +172,7 @@ describe('[Singlenodes] when parsing', () => { it('should handle a single double circle node with whitespace after it', function () { // Silly but syntactically correct - const res = flow.parser.parse('graph TD;a()(A)() ;'); + const res = flow.parser.parse('graph TD;a(((A))) ;'); const vert = flow.parser.yy.getVertices(); const edges = flow.parser.yy.getEdges(); @@ -183,7 +183,7 @@ describe('[Singlenodes] when parsing', () => { it('should handle a single double circle node with html in it (SN3)', function () { // Silly but syntactically correct - const res = flow.parser.parse('graph TD;a()(A
end)();'); + const res = flow.parser.parse('graph TD;a(((A
end)));'); const vert = flow.parser.yy.getVertices(); const edges = flow.parser.yy.getEdges(); diff --git a/src/diagrams/flowchart/parser/flow.jison b/src/diagrams/flowchart/parser/flow.jison index 5dc7e65d9..79175307a 100644 --- a/src/diagrams/flowchart/parser/flow.jison +++ b/src/diagrams/flowchart/parser/flow.jison @@ -121,8 +121,8 @@ that id. "[|" return 'VERTEX_WITH_PROPS_START'; "[(" return 'CYLINDERSTART'; ")]" return 'CYLINDEREND'; -"()(" return 'DOUBLECIRCLESTART'; -")()" return 'DOUBLECIRCLEEND'; +"(((" return 'DOUBLECIRCLESTART'; +")))" return 'DOUBLECIRCLEEND'; \- return 'MINUS'; "." return 'DOT'; [\_] return 'UNDERSCORE';