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

Duplicated IDs for markers (still) #5741

Open
Bunker-D opened this issue Aug 23, 2024 · 0 comments · May be fixed by #5756
Open

Duplicated IDs for markers (still) #5741

Bunker-D opened this issue Aug 23, 2024 · 0 comments · May be fixed by #5756
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@Bunker-D
Copy link

Description

There are still duplicated IDs for the markers in various diagram types, which can cause various formatting issues (such as disappearing arrows). This was the subject of issues #1318, #3267 and #1871, that where closed after the merge #4825 — but arguably wrongfully so for #1318 and #3267.

In fact, the issue was solved for class diagrams, flowcharts and state diagrams, but remains for:

  • C4 context diagrams (C4Context)
  • Entity Relationship diagrams (erDiagram)
  • Requirement diagram (requirementDiagram)
  • Sequence diagrams (sequenceDiagram)
  • Timelines (timeline) and User journeys (journey).

Steps to reproduce

Any of the aforementioned diagram types. See this issue for a practical case with the associated code. (n this case, the first Mermaid diagram is within a foldable section.)

Screenshots

No response

Code Sample

No response

Setup

No response

Suggested Solutions

The suggested solution would be the same as merge #4825: using the id of the diagram (the SVG element) as a prefix to the markers it defines.

It would probably be a good thing to add classes to the markers for styling purposes. Typically, class="mermaid-<diargame_type>-<marker_old_id>".

🖐 I am already working on it (and it looks like it's working); however, I might need some help with the testing part.

Additional Context

No response

@Bunker-D Bunker-D added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Aug 23, 2024
@Bunker-D Bunker-D linked a pull request Aug 24, 2024 that will close this issue
4 tasks
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

Successfully merging a pull request may close this issue.

1 participant