Error parsing Mermaid diagram with title set

Steps to reproduce

With the following

```mermaid
---
title: Animal example
---

classDiagram

Animal <|-- Duck

Expected result

Graph with title

Actual result

Error parsing Mermaid diagram!

Parse error on line 1:
---title: Animal e
^
Expecting 'open_directive', 'NEWLINE', 'SPACE', 'GRAPH', got 'LINK'`

Environment

  • Operating system: Windows 10
  • Debug info:

Additional information

1 Like

Confirming this issue.

Mermaid frontmatter isn’t parsed properly.

Screenshot from 2023-02-01 20-48-04

For comparison here is the same graph in the Mermaid live editor, which works just fine.

when was this added to mermaid?

1 Like

This seems to be a merged in Nov 21, 2022 (https://github.com/mermaid-js/mermaid/pull/3706)

We updated in 1.1.13

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.