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 Diagrams: Rendering classes that are related to themselves draws broken arrows and labels #6236

Open
PhilippSchwaab opened this issue Jan 29, 2025 · 1 comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@PhilippSchwaab
Copy link

Description

When trying to render Mermaid class diagrams with classes that self reference arrows and labels break. This has not happened in older mermaid versions but is an issue in v11.4.0

Steps to reproduce

The following code demonstrates the bug:

classDiagram
class Test
Test "1" --> "n" Test

Produces output that looks like this (generated using develop.git.mermaid.live):

Image

Screenshots

No response

Code Sample

classDiagram
class Test
Test "1" --> "n" Test

Setup

  • Mermaid version: v11.4.0
  • Browser and Version: [Firefox] 134.0.1

Suggested Solutions

No response

Additional Context

No response

@PhilippSchwaab PhilippSchwaab added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Jan 29, 2025
@nourhenta
Copy link

Class Diagram: Rendering Self-Referencing Classes Results in Broken Arrows and Labels

Hello @PhilippSchwaab ,

I tested this issue in my local environment using Mermaid v11.4.0 and the provided example.
I can confirm that the issue persists as described. Specifically, when rendering a class diagram with self-referencing arrows, the arrows and labels are broken.

Important Notes:

  • The issue persists when testing locally using the development environment.
  • I also reproduced the issue in the Mermaid Live Editor with the same version (v11.4.0).

Environment Details:
Mermaid Version: v11.4.0
Browser: Microsoft Edge (Version: 132.0.2957.127)

Local testing:
Image

Mermaid Live Editor:
Image

I will now proceed to investigate the root cause of this issue and explore potential fixes.

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