mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-23 10:16:43 +02:00
Correct classDef and class grammar
Previously, you were allowed to define a class called 'default' but were not allowed to use it because the classStatement grammar expected an alphanum, which did not include the word DEFAULT
This commit is contained in:
@@ -891,4 +891,15 @@ graph TD
|
||||
{ htmlLabels: true, flowchart: { htmlLabels: true }, securityLevel: 'loose' }
|
||||
);
|
||||
});
|
||||
it('66: apply class called default on node called default', () => {
|
||||
imgSnapshotTest(
|
||||
`
|
||||
graph TD
|
||||
classDef default fill:#000,stroke:#000,stroke-width:4px,color:#fff
|
||||
default --> default2
|
||||
class default,default2 default
|
||||
`,
|
||||
{ htmlLabels: true, flowchart: { htmlLabels: true }, securityLevel: 'loose' }
|
||||
);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user