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

Invisible links in mermaid #3350

Closed
cscheid opened this issue Nov 16, 2022 Discussed in #3349 · 5 comments
Closed

Invisible links in mermaid #3350

cscheid opened this issue Nov 16, 2022 Discussed in #3349 · 5 comments
Assignees
Labels
diagrams-mermaid Mermaid diagrams enhancement New feature or request
Milestone

Comments

@cscheid
Copy link
Collaborator

cscheid commented Nov 16, 2022

Discussed in #3349

Originally posted by aghaynes November 16, 2022
According to the help files for mermaid, it is possible to have invisible links between nodes in mermaid charts, which can be particularly useful for enforcing a particular layout. https://mermaid-js.github.io/mermaid/#/flowchart?id=an-invisisble-link E.g. the following code should produce the flowchart further down.

```{mermaid}
flowchart LR
  box1 --> box2
  box2 --- box3
  box4 ~~~ box2
```

grafik

Executing the chunk in quarto produces a syntax error though.

It seems like the invisible links are probably a new feature (there's an issue referencing a commit in mid-October - mermaid-js/mermaid#3192).

I guess this would require an update to the version of mermaid in quarto?

@cscheid cscheid added the enhancement New feature or request label Nov 16, 2022
@cscheid cscheid added this to the v1.3 milestone Nov 16, 2022
@cscheid cscheid self-assigned this Nov 16, 2022
@cscheid cscheid added the diagrams-mermaid Mermaid diagrams label Nov 16, 2022
cscheid added a commit that referenced this issue Nov 18, 2022
@cscheid cscheid closed this as completed Nov 18, 2022
@fkohrt
Copy link

fkohrt commented Jan 12, 2023

@cscheid It seems invisible links have been removed as a feature in mermaid v9.3.0 again. At least I cannot find the changes that were introduced by the following two commits neither in v9.3.0 nor in develop:

@cscheid
Copy link
Collaborator Author

cscheid commented Jan 12, 2023

@fkohrt I apologize, but we will be upgrading mermaid once per release and no further; it's not sustainable for us to continually chase their changes. If your setup requires mermaid to be on the very latest version, I think the best shot is for you to download the github repo for quarto, and update mermaid.js and mermaid.min.js yourself based on the commit 75fd336.

@fkohrt
Copy link

fkohrt commented Jan 12, 2023

@cscheid Thank you very much for your hints and pointers. However, there is no feature that a more recent version of mermaid has that I want. Rather, I wanted to inform you that in case you decide to bump your mermaid dependency in the future, you will have to re-open this issue, as invisible links have been removed as a feature in mermaid v9.3.0 (in contrast to your currently bundled v9.2.2). This is not actionable, just a heads-up :)

@cscheid
Copy link
Collaborator Author

cscheid commented Jan 12, 2023

@fkohrt I appreciate the heads up!

@fkohrt
Copy link

fkohrt commented Feb 23, 2023

Invisible links will be re-introduced with mermaid v10.0.0 (see mermaid-js/mermaid#4113).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
diagrams-mermaid Mermaid diagrams enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants