Mermaid render in editor give "Syntax error in text" for flowcharts

Summary

A mermaid diagram in many cases is not represented correctly and give an error

Steps to reproduce

If the bug is already present (right now) this piece of code:

image

give this graphic error:

gitGraph:
    commit id: "1"
    commit id: "2"
    commit id: "3"
    commit id: "4"

in the place of (render by mermaid.live)

image

How can reproduce

  • Write this code in the editor:

image

Current bug behavior

Reproducible on Version
gitlab.com 18.7.0-pre 4e9835e4539
gitlab.com 18.8.0-pre d8a99b55db2
self-managed 18.5.2-ee
Edited by 🤖 GitLab Bot 🤖