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

Unexpected behavior from classdiagram class fields containing parentheses inside of brackets #5881

Open
diceroll123 opened this issue Sep 20, 2024 · 0 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@diceroll123
Copy link

Description

It seems that after parentheses close, anything after that is strictly put after the : for the class field.

I got this from a valid Python type annotation, https://github.com/fastapi/fastapi/blob/7c6f2f8fde68f488163376c9e92a59d46c491298/fastapi/datastructures.py#L64-L73 (see third line in my repro)

Steps to reproduce

classDiagram
    class Thing {
        + a()] blah
        + Literal[a("blah!")] blah
        + Annotated[Optional[str], Doc("The original file name.")] filename
    }
Loading

Screenshots

No response

Code Sample

No response

Setup

  • Mermaid version:
  • Browser and Version: [Chrome, Edge, Firefox]

Suggested Solutions

No response

Additional Context

No response

@diceroll123 diceroll123 added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Sep 20, 2024
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

1 participant