mjbvz / vscode-markdown-mermaid

Adds Mermaid diagram and flowchart support to VS Code's builtin markdown preview
https://marketplace.visualstudio.com/items?itemName=bierner.markdown-mermaid
MIT License
640 stars 115 forks source link

Direction applies to all class diagrams in a markdown file #116

Open lonix1 opened 2 years ago

lonix1 commented 2 years ago

When there are multiple class diagrams in a single markdown file, the same direction is applied to all of them.

e.g.


## Title

```mermaid
classDiagram
  direction RL
  A <|-- B

Title

%% this class diagram will also have direction RL
classDiagram
  Animal <|-- Dog


The workaround is to redeclare the `direction` for every diagram. Not nice.

I'm unsure whether this is a problem in the extension, or the underlying mermaid library?