Mermaid ELK engine not working

Not sure if it's a bug or a missing configuration/library for mermaid, but ELK engine doesn't seem to be available in desktop and mobile.

---
config:
  layout: elk
---
graph TB
   a-->b & c
   c-->b

This should render as:

But the default engine is used.

I also tried with the init option, but ELK is just ignored.

Reference: Mermaid documentation

@lucabartoli welcome to the forum.

Looking at this issue on the Mermaid GitHub it seems that the elk layout is not working for Mermaid version 11.*. However the comments suggest that elk is not part of the default Mermaid package and their GitHub releases seems to indicate that it is packaged separately.

Joplin is currently using 11.4.0.

Well, the elk engine has been moved to a separate package, because of the different licensing in mermaid and elk.
Pull Reference here
I honestly don't know what's needed to include the library directly in the build, without breaking the
EPL-2.0 license, but it should be totally feasible.
It can also be shipped as a separate plugin, if needed.