fralau / mkdocs-mermaid2-plugin

A Mermaid graphs plugin for mkdocs
https://mkdocs-mermaid2.readthedocs.io
MIT License
203 stars 25 forks source link

Asynchronous messages in sequence diagrams not supported #45

Closed maxmar391 closed 2 years ago

maxmar391 commented 2 years ago

First of all, thanks for this great work and this fabulous plugin for mkdocs!

To make it even better, I wanted to report an issue that I encountered: The plugin seems to have some trouble to display asynchronous messages in mermaid sequence diagrams.

Asynchronous messages are described at https://mermaid-js.github.io/mermaid/#/sequenceDiagram?id=messages in the table. When I try to include an asynchronous message, the rendered diagram breaks down. Instead of the diagram, a syntax error message is displayed.

This might be due to the fact that the newest version of mermaid is 8.12.1 (as of September) and the plugin seems to use mermaid 8.8.0. At least that's the version number provided in the syntax error message displayed instead of the diagram. I am not sure, when the notation of asynchronous messages was introduced and whether is is already supported by version 8.8.0.

Best regards, Max

github-actions[bot] commented 2 years ago

Thank you for your contribution! This is very appreciated.

fralau commented 2 years ago

@maxmar391 Thanks!

As a first step, could you try to specify the library version expected (in your config file) and see what happens?

maxmar391 commented 2 years ago

So far, I have not specified the library version in the config file.

I have specified the version in the config file an the following happens:

When specifying version 8.6.4 (as in the code snippet on the website), the result is the same. The diagram is not rendered. Instead there is the syntax error message displayed, this time just with the version number 8.6.4.

When specifying version 8.9.0 (one minor version higher), the diagram is successfully rendered, no error message.

When specifying version 8.11.4 (the version currently used by the mermaid online editor), the diagram is successfully rendered.

When specifying version 8.12.1 (the latest version of mermaid), the diagram is also successfully rendered.

So I believe the asynchronous message was introduced perhaps with mermaid version 8.9.0. I am still confused, because I tried to specify the version last week and I got the error message when trying out 8.12.1. Maybe something else went wrong there...

I hope this is still a good learning for you, besides making such a fuss about what seems an easy fix.

fralau commented 2 years ago

Not problem at all: you just provided us some good testing and documentation, thanks!

I marked this issue as "useful tip" 👍

If this is OK to you, just close the issue.