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:
Ibrahim Wassouf
2023-07-25 20:34:48 -03:00
parent 20cd685ae3
commit 30a9b5574d
2 changed files with 13 additions and 2 deletions

View File

@@ -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' }
);
});
});