Skip to content

Impossible to add newlines to flowchart nodes with maths in them #7194

@wolverian

Description

@wolverian

Description

When I write a graph with a node whose label contains an equation, it seems impossible to add manual linebreaks to the text, regardless of whether you try to put them inside the equation or outside it.

Steps to reproduce

Open on mermaid.live

Screenshots

Image

Code Sample

graph TD
  plain["line 0
  line 1"]
  markdown["`line 0
  line 1`"]
  plainmath["line 0
  line 1
  $$x=42$$
  line 2"]
  markdownmath["`line 0
  line 1
  $$x=42$$
  `"]

Setup

  • Mermaid version: v11.12.0
  • Browser and Version: Safari 26.1

Suggested Solutions

No response

Additional Context

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions