-
Notifications
You must be signed in to change notification settings - Fork 126
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
Sequence diagram arrows and numbers disappear #270
Comments
It looks like issue I fixed for Obsidian! Maybe somebody can take that to fix the issue here too. ProblemAssuming it is the same issue, it stems from the fact that arrows and other markers use an id rather than a class to be formatter. This was a known issue with Mermaid: #1318, #1871, #3267. This led to duplicate ids for the markers. And when a marker, like an arrow, is added to an edge, it is referred to using SolutionsSolution 0: Mermaid update?It seems that this issue with Mermaid is supposed to be resolved. That being said, it is supposed to be resolved since Mermaid v10.5.0, and the Solution 1: Making the ids identicalOne solution is to modify the DOM elements of the SVG produced by Mermaid, and replace every marker id with a unique id. See the implementation I proposed for Obsidian. Solution 2: Injecting “visible” markers early in the HTMLThe other solution is more of a hack, and consists into creating markers with the same ids that would be the first elements with this id in the HTML, and that would be hidden from the user in practice but would not have the I implemented that as a hack to fix the issue for Obsidian (before Solution 1 was implemented). More explanations here. |
Update: Actually, the issue has been solved in Mermaid only for some types of graphs (Class diagrams ( I'm currently trying to implement and push a fix for the remaining graph types. |
Easily copiable markdown showing the issue: ## First
<details>
```mermaid
sequenceDiagram
autonumber
participant User
participant Client
User-->>Client: Talks to client
```
</details>
## Second
```mermaid
sequenceDiagram
autonumber
participant User
participant Client
User-->>Client: Talks to client
``` |
@mjbvz I see you labeled the issue as a bug on your side. But it really is a bug with Mermaid itself, that has been partially corrected. I proposed a resolution for the issue through pull request #5756, but it was blocked due to a file I fail to remove from the PR (see the conversation there). If you can help on this side, this would probably be easier and more relevant than implementing a workaround in your own extension. |
Extension version: v1.23.1
VS code version: 1.92.0
If you put a sequence diagram inside of a details tag, and then create another sequence diagram on that same page, all subsequence sequence diagrams will appear to be missing their arrows and numbers due to a coloring issue
Removing the details section fixes it
Two with first inside of details
Highlight seemingly empty section
No details section
The text was updated successfully, but these errors were encountered: