Skip to content

Commit 57ccac0

Browse files
authored
Merge pull request #27 from JansthcirlU/26-fix-node-shape-rendering
Fix node shape rendering #26
2 parents f2c96e5 + 8b4df78 commit 57ccac0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Mermaid.Flowcharts/Nodes/Node.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ public string ToMermaidString(int indentations = 0, string indentationText = "
3434
NodeShape.Hexagon => "{{",
3535
NodeShape.Parallelogram => "[/",
3636
NodeShape.ParallelogramAlt => "[\\",
37-
NodeShape.Trapezoid => "[/\\",
38-
NodeShape.TrapezoidAlt => "[\\/",
37+
NodeShape.Trapezoid => "[/",
38+
NodeShape.TrapezoidAlt => "[\\",
3939
_ => "[",
4040
};
4141

@@ -52,8 +52,8 @@ public string ToMermaidString(int indentations = 0, string indentationText = "
5252
NodeShape.Hexagon => "}}",
5353
NodeShape.Parallelogram => "/]",
5454
NodeShape.ParallelogramAlt => "\\]",
55-
NodeShape.Trapezoid => "/\\]",
56-
NodeShape.TrapezoidAlt => "\\/]",
55+
NodeShape.Trapezoid => "\\]",
56+
NodeShape.TrapezoidAlt => "/]",
5757
_ => "]",
5858
};
5959

tests/Mermaid.Flowcharts.Tests/NodeTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ public class NodeTests
1717
[InlineData("a", "b", NodeShape.Hexagon, "a{{\"b\"}}")]
1818
[InlineData("a", "b", NodeShape.Parallelogram, "a[/\"b\"/]")]
1919
[InlineData("a", "b", NodeShape.ParallelogramAlt, "a[\\\"b\"\\]")]
20-
[InlineData("a", "b", NodeShape.Trapezoid, "a[/\\\"b\"/\\]")]
21-
[InlineData("a", "b", NodeShape.TrapezoidAlt, "a[\\/\"b\"\\/]")]
20+
[InlineData("a", "b", NodeShape.Trapezoid, "a[/\"b\"\\]")]
21+
[InlineData("a", "b", NodeShape.TrapezoidAlt, "a[\\\"b\"/]")]
2222
public void NodeToMermaidString_ShouldRenderCorrectShape(string identifier, string text, NodeShape shape, string expected)
2323
{
2424
// Arrange

0 commit comments

Comments
 (0)