I want to be able to define a generic class in class diagrams. This currently breaks because the parser doesn't allow < or > in the class name.
class Test<T> {
+ test: int
}
If this syntax would break something, there could be an alternative syntax
class Test{T} {
+ test: int
}
This should render with < > brackets. Needs more work because this means additional parsing.
New contributor here! I'm interested in taking this on. Looks like the grammar in _classDiagram.jison_ will need to be added to.
_Edit_: originally incorrectly referred to _flow.json_
@keenanjt33 Don't forget to check the contribution guide and join us in slack if you need any pointers/help. Leave a comment when you're sure you'll work on it and we'd be happy to assign it to you and remove the help wanted label.
Looks like the grammar in _flow.jison_ will need to be added to.
This issue is about class diagrams, not flow diagrams.
@keenanjt33 Just checking - Are you working on this?
I have taken an initial attempt at this one. Please see forked branch at: https://github.com/jgreywolf/mermaid/tree/1063-GenericTypeSupportInClassDiagrams
Im not 100% happy with it, due to how I am splitting the classname from the type... but I will continue to refactor and fiddle I am sure :)
Great. Please make sure to give a sign you're on working on an issue so we can block it for you and nobody else grabs it.
I was holding off on that waiting to see if the original person who said they were going to work on it piped up. And yet still worked on it to get the experience ;)
Most helpful comment
New contributor here! I'm interested in taking this on. Looks like the grammar in _classDiagram.jison_ will need to be added to.
_Edit_: originally incorrectly referred to _flow.json_