Skip to content

Line breaks no longer work in Mermaid diagrams

There has been a recent change that has made line breaks on Mermaid syntax to stop working.

Generally, whenever a new line is required <br> can be inserted. This seemed to work until a few days ago (see the screen capture incidentally taken on this issue).

What I've now noticed is that whenever a <br> is inserted, it is now being replaced by a <br/> and no new lines are created.

graph TD;
    A(Line1<br>Line2)-->B(Line1<br />Line2);
    A(Line1<br/>Line2)-->C;
    B-->D;
    C-->D;

This same graph on the Mermaid live editor displays the new lines as expected.

Edited by David Planella