mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-15 06:19:24 +02:00
Merge branch 'develop' into 6637-add-new-participant-types-to-sequence-diagrams
This commit is contained in:
5
.changeset/strong-dryers-pay.md
Normal file
5
.changeset/strong-dryers-pay.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'mermaid': patch
|
||||
---
|
||||
|
||||
fix: correctly render non-directional lines for '---' in block diagrams
|
@@ -393,6 +393,17 @@ describe('Block diagram', () => {
|
||||
overflow:3
|
||||
short:1
|
||||
also_overflow:2
|
||||
`,
|
||||
{}
|
||||
);
|
||||
});
|
||||
|
||||
it('BL31: edge without arrow syntax should render with no arrowheads', () => {
|
||||
imgSnapshotTest(
|
||||
`block-beta
|
||||
a
|
||||
b
|
||||
a --- b
|
||||
`,
|
||||
{}
|
||||
);
|
||||
|
@@ -238,13 +238,15 @@ export function edgeTypeStr2Type(typeStr: string): string {
|
||||
}
|
||||
|
||||
export function edgeStrToEdgeData(typeStr: string): string {
|
||||
switch (typeStr.trim()) {
|
||||
case '--x':
|
||||
switch (typeStr.replace(/^[\s-]+|[\s-]+$/g, '')) {
|
||||
case 'x':
|
||||
return 'arrow_cross';
|
||||
case '--o':
|
||||
case 'o':
|
||||
return 'arrow_circle';
|
||||
default:
|
||||
case '>':
|
||||
return 'arrow_point';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user