mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-14 04:49:44 +02:00
1179 Add ability to use generics for members
Created new class to handle parsing of members with regex to handle determining type of member and the different elements within. Also moved addTSpan in drawClass method to this new file. Finally, I added a "catch all" section in case something fails in the regex to make sure everything gets formatted correctly. Added more tests and documentation updating gitignore Tired of constantly having to ignore files and stash/pop when switching between branches
This commit is contained in:
@@ -289,4 +289,20 @@ describe('Class diagram', () => {
|
||||
);
|
||||
cy.get('svg');
|
||||
});
|
||||
|
||||
it('12: should render a simple class diagram with generic types', () => {
|
||||
imgSnapshotTest(
|
||||
`
|
||||
classDiagram
|
||||
class Class10~T~ {
|
||||
int[] id
|
||||
List~int~ ids
|
||||
test(List~int~ ids) List~bool~
|
||||
testArray() bool[]
|
||||
}
|
||||
`,
|
||||
{}
|
||||
);
|
||||
cy.get('svg');
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user