Skip to content

Commit 7fcfa22

Browse files
NCMBianchiclaude
andcommitted
mixed-operator golden test, updated README.md
Added: - cmd/testdata/{ascii,extended-chars}/mixed_operators_td.txt: TD branching diagram exercising all 5 alternative edge operators in one test Changed: - README.md: new "Other edge types" section documenting -.->, ==>, ---, --o, --x, using the same example as in cmd/testdata/{ascii,extended-chars}/mixed_operators_td.txt Co-Authored-By: Claude Sonnet 5.0 <noreply@anthropic.com>
1 parent 88e02d1 commit 7fcfa22

3 files changed

Lines changed: 100 additions & 0 deletions

File tree

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,42 @@ $ mermaid-ascii -f ./test.mermaid
162162
│ │
163163
└─────────┘
164164

165+
# Other edge types
166+
Besides the default `-->` arrow, flowchart edges also accept `-.->` (dotted), `==>` (thick), `---` (open, no arrowhead), `--o` (circle head), and `--x` (cross head):
167+
$ cat test.mermaid
168+
graph TD
169+
A -.-> B
170+
A ==> C
171+
B --- C
172+
B --o|example| D
173+
D --x C
174+
$ mermaid-ascii -f ./test.mermaid
175+
┌──────────┐
176+
│ │
177+
│ A │━━━━━━━┓
178+
│ │ ┃
179+
└─────┬────┘ ┃
180+
┆ ┃
181+
┆ ┃
182+
┆ ┃
183+
┆ ┃
184+
▼ ▼
185+
┌──────────┐ ┌───┐
186+
│ │ │ │
187+
│ B ├─────┤ C │
188+
│ │ │ │
189+
└─────┬────┘ └───┘
190+
│ ✕
191+
│ │
192+
example │
193+
│ │
194+
● │
195+
┌──────────┐ │
196+
│ │ │
197+
│ D ├───────┘
198+
│ │
199+
└──────────┘
200+
165201
# Read from stdin
166202
$ cat test.mermaid | mermaid-ascii
167203
┌───┐ ┌───┐ ┌───┐
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
graph TD
2+
A -.-> B
3+
A ==> C
4+
B --- C
5+
B --o|example| D
6+
D --x C
7+
---
8+
+----------+
9+
| |
10+
| A |=======+
11+
| | I
12+
+----------+ I
13+
: I
14+
: I
15+
: I
16+
: I
17+
v v
18+
+----------+ +---+
19+
| | | |
20+
| B |-----| C |
21+
| | | |
22+
+----------+ +---+
23+
| x
24+
| |
25+
example |
26+
| |
27+
o |
28+
+----------+ |
29+
| | |
30+
| D |-------+
31+
| |
32+
+----------+
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
graph TD
2+
A -.-> B
3+
A ==> C
4+
B --- C
5+
B --o|example| D
6+
D --x C
7+
---
8+
┌──────────┐
9+
│ │
10+
│ A │━━━━━━━┓
11+
│ │ ┃
12+
└─────┬────┘ ┃
13+
┆ ┃
14+
┆ ┃
15+
┆ ┃
16+
┆ ┃
17+
▼ ▼
18+
┌──────────┐ ┌───┐
19+
│ │ │ │
20+
│ B ├─────┤ C │
21+
│ │ │ │
22+
└─────┬────┘ └───┘
23+
│ ✕
24+
│ │
25+
example │
26+
│ │
27+
● │
28+
┌──────────┐ │
29+
│ │ │
30+
│ D ├───────┘
31+
│ │
32+
└──────────┘

0 commit comments

Comments
 (0)