We are using Mermaid 8.4.6 at the moment. The last version has a few nice additions (like ERD diagrams, but also bug fixes.)
I ran these tests on git master 62bc296a
Mermaid test code
# Flow Chart
```mermaid
graph LR;
A-->B;
A-->C;
B-->D;
C-->D;
```
# Sequence Diagram
```mermaid
sequenceDiagram
participant Alice
participant Bob
Alice->John: Hello John, how are you?
loop Healthcheck
John->John: Fight against hypochondria
end
Note right of John: Rational thoughts <br/>prevail...
John-->Alice: Great!
John->Bob: How about you?
Bob-->John: Jolly good!
```
End
There’s a difference in how the HTML is created. For Mermaid >= 8.5.0 the width is set as width: fit-content; which leads to the problem that you can see in the images above.
Yes, that could work. But isn’t this coming from Memaid? (Joplin was the same version in my tests, only Mermaid changed.) This means Joplin would have to change the generated code, right?
Hmm, I tried that, but if I change it from fit-content to 100%, the following happens:
```mermaid
graph LR
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
```
Normally it's easy and even documented but I guess no-one took the time to do it. Often we only update when there's a bug or significant improvement in the library.
You did not mention what Joplin version you are using but if you are using the current release version (Joplin v2.9.17) then it seems that the Mermaid version is 9.1.7 and the error dialog you are seeing is correct.
According to the release notes Mermaid was updated to 9.2.2 in Joplin v2.10.2.
Joplin v2.10.2 and later are all currently classed as pre-releases.
If tessus, a dev, is having issues upgrading Mermaid it's probably not as easy as what you read suggested
Pre-releases are like "beta" versions released for testing. Then at some point a new "release" version will be made. Unless a feature has been introduced that you really need now (and Mermaid Mindmap is being implemented but isn't working yet) you might as well stay with the 2.9.17 release version.
You can see a list of changes made to Joplin since the last release version here.
I could upgrade Mermaid to 9.3.0, but it won't change the fact that mindmaps won't work. I have to find out why - I think it is because it's using a different rendering algorithm.
Also, I don't consider myself a JS dev. I'm very old school and a C programmer. My JS and TypeScript skills just suck. I was able to work on a few things in Joplin, but that doesn't make me a JS dev.