-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
[Class Diagram] Missing return type with multiple generic parameters #3188
Comments
@rami3l Thanks for reporting this. This sure is a worthy bug to be fixed. I will approve this, and we will wait for the PR fix. |
Yes please! +1 Even worse, if one of the generic parameters is itself a generic type - like in
with the line numbers and columns referring to https://cdnjs.cloudflare.com/ajax/libs/mermaid/src/diagrams/common/common.ts |
I'd love to see a fix too, and am grateful for this cool library! In the meantime I'm using this disgusting hack, which works for multiple generics. classDiagram
class FooService~R, E, A~ {
query(queryParams QueryParams): ReaderTaskEither~R,E,Quux~A~~
}
<<interface>> FooService
|
It seems to be reading left angle brackets as the beginning of HTML tags. If you use
classDiagram
class Cache~K, V~{
-map: HashMap<K, V>
+add(key: K)
+get(key: &K) Option~V~
}
|
Oh, no! The original post now gets me an error, which is even worse:
|
Using
|
Unicode angle brackets seem to be working fine for relation labels, class labels, generics return types and method arguments, and even C#-style generic method type arguments.
Stylewise, 〈You〉 ❬Can❭ ❰Pick❱ ⟨Your⟩ 〈Poison〉. |
Because this issue goes syntactically into the C# and .Net direction, let me plug the project that got me interested in it: netAmermaid - an automated documentation tool for visually exploring .NET assemblies along type relations using rapid diagramming. HTH. |
The main issue here is the use of a comma inside the generic definition. ie: between ~ and ~ I am working on a fix for this from another issue as well |
I have the same problem on version 10.1.0 The following code gives compilation errors (Maximum call stack size exceeded)
The following code does not render angle brackets
Workaround: using unicode characters (thank you @h0lg )
|
One year later and this still haven't been fixed |
I may close this in favor of #3287 - as these are symptoms of the same issue. I am working on this however |
Describe the bug
When trying to write the Class Diagram description below, I'd expect the method line to be rendered as
+dict() dict<K, V>
:... but instead I got the following:
The text was updated successfully, but these errors were encountered: