gh-markdown-preview icon indicating copy to clipboard operation
gh-markdown-preview copied to clipboard

Syntax error occur when multiple mermaid diagrams are included

Open ShortArrow opened this issue 1 year ago • 2 comments

Summary

If multiple mermaid diagrams are included in markdown file, a syntax error will occur.

Image

Reproduce

# test

```mermaid
stateDiagram
  s1-->s2
```

```mermaid
stateDiagram
  s1-->s2
```

ShortArrow avatar Jan 22 '25 07:01 ShortArrow

I see this as well. I'm going to see if I can fix this locally. I also just added an option to specify the mermaid version.

erik-nilcoast avatar Mar 04 '25 18:03 erik-nilcoast

Here's a PR for setting the mermaid version: https://github.com/yusukebe/gh-markdown-preview/pull/63 and removes the copy paste buttons which were interfering with mermaid.

erik-nilcoast avatar Mar 04 '25 23:03 erik-nilcoast