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

Class diagram: static abstract method does not work #5459

Open
TeaDrinkingProgrammer opened this issue Apr 12, 2024 · 1 comment · May be fixed by #5462
Open

Class diagram: static abstract method does not work #5459

TeaDrinkingProgrammer opened this issue Apr 12, 2024 · 1 comment · May be fixed by #5462
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@TeaDrinkingProgrammer
Copy link

TeaDrinkingProgrammer commented Apr 12, 2024

Description

When I want to define a static abstract method, it does not work.

Steps to reproduce

See code block and screenshot.

Screenshots

mermaid-diagram-2024-04-12-115822

Code Sample

classDiagram
    class Animal {
        +MakeNoise(TEntity domainEntity) string$*
    }

Setup

  • Mermaid version: 10.8.1 (CLI)
  • Browser and Version: N.A

Suggested Solutions

No response

Additional Context

No response

@TeaDrinkingProgrammer TeaDrinkingProgrammer added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Apr 12, 2024
@TeaDrinkingProgrammer
Copy link
Author

I am quite sure I have found the bug in the sourcecode. This:

    switch (this.classifier) {
      case '*':
        return 'font-style:italic;';
      case '$':
        return 'text-decoration:underline;';
      default:
        return '';
    }

Should be this (approximately, I don't know if the syntax is exactly right):

    switch (this.classifier) {
      case '*':
        return 'font-style:italic;';
      case '$':
        return 'text-decoration:underline;';
      case '$*' || '*$':
        return 'font-style:italic;text-decoration:underline;'
      default:
        return '';
    }

I'll test further this weekend and submit a PR.

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
1 participant