From 9bfa4813a85a030160dc58cd1b532d7e1d150937 Mon Sep 17 00:00:00 2001 From: moilanik Date: Fri, 10 Apr 2026 08:50:04 +0300 Subject: [PATCH] docs(mermaid): enforce actual line breaks for multiline text The \n literal often fails to render correctly in Mermaid nodes. The guidelines now require using actual newlines inside quoted text to ensure multiline content displays reliably. --- .ai/instructions/skills/mermaid.instructions.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.ai/instructions/skills/mermaid.instructions.md b/.ai/instructions/skills/mermaid.instructions.md index dafc7a0..174aaac 100644 --- a/.ai/instructions/skills/mermaid.instructions.md +++ b/.ai/instructions/skills/mermaid.instructions.md @@ -15,6 +15,20 @@ Use `-- "text" -->` syntax, **not** `-->|text|` syntax. --- +## Line Breaks (Multiline Text) + +Do not use `\n` for line breaks inside Mermaid nodes or labels. It does not always render correctly. +Instead, use actual line breaks (real newlines) inside quoted text. + +``` +✅ A["First line +Second line"] + +❌ B["First line\nSecond line"] +``` + +--- + ## Color Contrast — CRITICAL All Mermaid diagrams MUST have sufficient color contrast. AI-generated diagrams often fail this.