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

Angle brackets in generics and stereotypes not properly parsed #59

Open
Enteee opened this issue Jun 29, 2020 · 0 comments
Open

Angle brackets in generics and stereotypes not properly parsed #59

Enteee opened this issue Jun 29, 2020 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Enteee
Copy link
Owner

Enteee commented Jun 29, 2020

Describe the bug
To some degree, angle brackets are allowed in generics and stereotypes. For example, the following diagram:

' Angle brackets in generics
class TestGenericsWithAngleBrackets < <G1> >
class TestGenericsWithDoubleAngleBrackets < <<G1>> >

' Angle brackets in stereotypes
class TestStereotypeWithAngleBrackets << <S1> >>
class TestStereotypeWithDoubleAngleBrackets << <<S1>> >>

produces the following diagram:
angle-brackets

Currently we do not support this in the parser. Therefore the parsed result is:

[
  {
    "name": "anglebrackets",
    "diagrams": [
      {
        "elements": [
          {
            "comment": "Angle brackets in generics"
          },
          {
            "name": "TestGenericsWithAngleBrackets",
            "title": "TestGenericsWithAngleBrackets",
            "isAbstract": false,
            "members": [],
            "extends_": [],
            "implements_": [],
            "generics": "<G1",
            "stereotype": ""
          },
          {
            "name": "TestGenericsWithDoubleAngleBrackets",
            "title": "TestGenericsWithDoubleAngleBrackets",
            "isAbstract": false,
            "members": [],
            "extends_": [],
            "implements_": [],
            "generics": "<<G1",
            "stereotype": ""
          },
          {
            "comment": "Angle brackets in stereotypes"
          },
          {
            "name": "TestStereotypeWithAngleBrackets",
            "title": "TestStereotypeWithAngleBrackets",
            "isAbstract": false,
            "members": [],
            "extends_": [],
            "implements_": [],
            "generics": "",
            "stereotype": "<S1>"
          },
          {
            "name": "TestStereotypeWithDoubleAngleBrackets",
            "title": "TestStereotypeWithDoubleAngleBrackets",
            "isAbstract": false,
            "members": [],
            "extends_": [],
            "implements_": [],
            "generics": "",
            "stereotype": "<<S1"
          }
        ]
      }
    ]
  }
]

To Reproduce
Steps to reproduce the behavior:

  1. Write diagram to file anglebrackets
  2. node dist/bin/cli.js -i anglebrackets

Expected behavior
Angle brackets should be parsed properly and added to the generics and/or stereotype property.

Additional context

Double angle brackets:

class TestStereotypeWithDoubleAngleBrackets << <<S1>> >>

Is not properly handled by the original plantuml implementation.

@Enteee Enteee added the bug Something isn't working label Jun 29, 2020
@Enteee Enteee self-assigned this Jun 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant