Skip to content

Class Diagrams: Rendering classes that are related to themselves draws broken arrows and labels #6236

Open
@PhilippSchwaab

Description

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

Metadata

Assignees

No one assigned

    Labels

    Status: TriageNeeds to be verified, categorized, etcType: Bug / ErrorSomething isn't working or is incorrect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions