The short answer
A Mermaid mind map uses indentation alone for levels. The rules are few and strict: one root, equal indentation for siblings, and brackets in the text are read as shapes. These five cases cover nearly every failure.
1. More than one root
Only one line may sit at the outermost level. Two lines at the same outer level are two roots:
mindmap
Revision plan
Exam schedule
Move the second under the first, or add a root above both:
mindmap
End of term
Revision plan
Exam scheduleEdit the text, switch themes and download PNG, Word or PowerPoint from there.
2. Uneven indentation
Siblings need the same indentation and children need more than their parent. Mixing spaces and tabs is the usual culprit; use spaces only.
mindmap
Reading notes
Main ideas
Idea one
Idea two
Quotes
ActionsEdit the text, switch themes and download PNG, Word or PowerPoint from there.
3. Brackets in the text
Name(detail) is read as an id plus a rounded shape, so unbalanced or nested brackets fail. Rephrase without brackets, or wrap the whole text in a shape:
mindmap
root((Product launch))
Market research
["Competitors (3 vendors)"]Edit the text, switch themes and download PNG, Word or PowerPoint from there.
4. Syntax that mind maps do not support
- Arrows
-->: a mind map has no links, only indentation. classDefandstyle: custom style statements are not supported; change the theme for colors.- Leading
-,*or1.: these are Markdown list markers, not mindmap syntax. Remove them.
5. The mindmap line appears twice
AI assistants sometimes split one map into two parts, each starting with mindmap. A diagram can have only one, so merge both parts under one root.
Let the editor fix it
The mind map page and the editor detect most of these: list markers, a repeated mindmap line and brackets in the text get a one-click "Fix it". The full syntax is in Mind map syntax, and ready-made structures are in the mind map templates.