Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It is not possible to use the comma "," as separator for generic type fields, parameters and return types #4836

Closed
sk0gen opened this issue Sep 13, 2023 · 1 comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@sk0gen
Copy link

sk0gen commented Sep 13, 2023

Description

There is no possibility to use comma as separator inside Generic return type/parameter in methods but
it is possible to use ClassDiagram with generic types for example

classDiagram
	class ExampleClass~T1,T2~
	ExampleClass : +Document Document
	ExampleClass : +Collection Collection

and it's genereting the graph as expected
image

Another working scenario:

classDiagram
	class ExampleClass~T1,T2~
	ExampleClass : +Document Document
	ExampleClass : +Collection Collection 
        ExampleClass : +ExampleMethod(List~T~ parameter)

image

Unfortunately it is not possible to use comma (',') in similar scenario inside method declaration

classDiagram
	class ExampleClass~T1,T2~
	ExampleClass : +Document Document
	ExampleClass : +Collection Collection 
        ExampleClass : +ExampleMethod(List~T,T1~ parameter)

Steps to reproduce

  1. Open live editor
  2. Use Code Sample
  3. Diagram is not generated

Screenshots

No response

Code Sample

classDiagram
	class ExampleClass~T1,T2~
	ExampleClass : +Document Document
	ExampleClass : +Collection Collection 
        ExampleClass : +ExampleMethod(List~T,T1~ parameter)

Setup

  • Mermaid version: Mermaidv10.3.0 Live Editor
  • Browser and Version: [Version 1.57.57 Chromium: 116.0.5845.163 (Official Build) (64-bit)]

Suggested Solutions

  • It should be possible to use comma as separator of generics inside methods, fields etc.

Additional Context

No response

@sk0gen sk0gen added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Sep 13, 2023
@sk0gen sk0gen changed the title It is not possible to use the comma "," for generic type fields, parameters and return types It is not possible to use the comma "," as separator for generic type fields, parameters and return types Sep 13, 2023
@sidharthv96
Copy link
Member

image

This is fixed in v10.5.0-rc.1

We will release 10.5.0 soon.

You can use https://mermaid-js.netlify.app to run the latest unreleased code from the develop branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

No branches or pull requests

2 participants