Mermaid-Chart/vscode-mermaid-preview

Incorrect when there is two classDiagram in one markdown file

Opened this issue · 2 comments

If threre is two classDiagram in one markdown file, The second classDiagram is incorrect
(vscode:1.36.1 mermaid preview: 0.12.2)

Expected behaviour

classDiagram
Class1 <|-- Class2
Loading
classDiagram
Class4 <|-- Class3
Loading

Actual behaviour

图片

Thanks for brining this thing up.

I'm not able to replicate the behaviour. Using the following snippet I get always a single diagram rendered when the cursor is inside the fence:

```mermaid
classDiagram

Class1 <|-- Class2
```


```mermaid
classDiagram

Class4 <|-- Class3
```

Based on your sample code it seems that you have a space between the fence ``` and mermaid. If that is correct you should not get any rendering. Anyway, there should not be two diagrams rendered in any case.

Can you post the exact markdown file you are trying to render, details about operating system, a better screen capture that shows also the title of the preview panel, maybe the console log? Anything that would help hunting down the source... Thanks!

Thank you for you reply.

My OS is Windows 7 service pack1 64bit

Here is my screen capture and markdown file.
图片

My markdown file:
test.zip