Skip to content

Parsing mermaid code error

Summary

GitLab 12.1: When trying to render graphics in a wiki/issue/markdown using mermaid, I get this error:

image

The mermaid code is the following:

graph TB

  SubGraph1 --> SubGraph1Flow
  subgraph SubGraph 1 Flow
  SubGraph1Flow(SubNode 1)
  SubGraph1Flow -- Choice1 --> DoChoice1
  SubGraph1Flow -- Choice2 --> DoChoice2
  end

  subgraph Main Graph
  Node1[Node 1] --> Node2[Node 2]
  Node2 --> SubGraph1[Jump to SubGraph1]
  SubGraph1 --> FinalThing[Final Thing]

end

If I quote "SubGraph 1 Flow" and "Main Graph" then the graphic is ok:

graph TB

  SubGraph1 --> SubGraph1Flow
  subgraph "SubGraph 1 Flow"
  SubGraph1Flow(SubNode 1)
  SubGraph1Flow -- Choice1 --> DoChoice1
  SubGraph1Flow -- Choice2 --> DoChoice2
  end

  subgraph "Main Graph"
  Node1[Node 1] --> Node2[Node 2]
  Node2 --> SubGraph1[Jump to SubGraph1]
  SubGraph1 --> FinalThing[Final Thing]

end

But it was the opposite in the previous version of GitLab (12.0)