Skip to main content

Mermaid code on a page or work item isn't drawn

Symptom​

A Confluence page or Jira work item has Mermaid code, but Mermaid diagrams on this page doesn't list it, or Jira shows no Mermaid Diagrams section in the right-hand column.

The code doesn't start with a diagram type​

Cause: The app looks for code whose first line starts a Mermaid diagram, such as flowchart TD or sequenceDiagram. A first line with something else, such as a title or a blank comment block before it, isn't recognized.

Solution: Make the diagram type the first line of the code block. A --- front matter block or %% comments may come before it.

The code isn't in a code block​

Cause: Mermaid code typed as normal text, without a code block or a ```mermaid fence, isn't found.

Solution: Put the code in a code block. In the editor, type ``` at the start of a line, or use Insert (+) > Code snippet.

Jira: the code is in an older comment or there's too much​

Cause: The app searches the description and the newest 1,000 comments, and shows up to 20 diagrams per work item.

Solution: Move the diagram into the Mermaid Diagrams panel. See Add diagrams to a Jira work item.

Still not working?​

Contact support with the page or work item link and the code block.