fix: ensure class def color is applied to edge label

on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
This commit is contained in:
darshanr0107
2025-08-06 12:21:34 +05:30
parent 4ab98c2ec7
commit 93df13898f
2 changed files with 17 additions and 2 deletions

View File

@@ -1133,4 +1133,17 @@ end
`
);
});
it('V2 - 17: should apply class def colour to edge label', () => {
imgSnapshotTest(
` graph LR
id1(Start) link@-- "Label" -->id2(Stop)
style id1 fill:#f9f,stroke:#333,stroke-width:4px
class id2 myClass
classDef myClass fill:#bbf,stroke:#f66,stroke-width:2px,color:white,stroke-dasharray: 5 5
class link myClass
`
);
});
});