Mermaid self-looping in diagrams looking weird

What I’m trying to do

Basically… I’m trying to make a state diagram of an automaton. That means that there are going to be self-loops in it. The problem is, as you can see, the self-loops are looking weird.

Things I have tried

As of now, I’ve tried pasting different CSS snippets and adding

%%{ init: { 'flowchart': {'defaultRenderer': 'elk' } } }%%

and

%%{init: {'flowchart': {'curve': 'basis'}}}%%

in the beggining of the mermaid codeblock

Unfortunately, it’s Mermaid: Self-edges/loops look very awkward in state diagrams · Issue #6336 · mermaid-js/mermaid · GitHub

Also unfortunate, we can’t declare ELK the way you tried: Mermaid: Support Elk layout system in core Obsidian

I haven’t tried it yet, but someone released a plugin that enables ELK in Obsidian’s Mermaid: https://community.obsidian.md/plugins/mermaid-elk-renderer. And there might be more plugins.

I use the Mermaid ELK Renderer plugin and it helps a lot.