Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mermaid ```Mermaid syntax #15

Closed
chris2fr opened this issue Feb 20, 2021 · 4 comments
Closed

Mermaid ```Mermaid syntax #15

chris2fr opened this issue Feb 20, 2021 · 4 comments
Labels

Comments

@chris2fr
Copy link

Expected Behavior

With the following, I should see a mermaid diagram:

graph LR
A -> B
B -> C
C -> A
Loading

Actual Behavior

The text as follows is apparant

\'\'\'mermaid
A->B
B->C
C -> A
\`\`\`

Steps to Reproduce the Problem

  1. Create the above file
  2. m

Specifications

(The version of the project, operating system, hardware etc.)

AlpineLinux in WSL

@D0n9X1n
Copy link
Owner

D0n9X1n commented Feb 21, 2021

I found there are two issues in your example snippet.

  1. You need use keyword chart instead of mermaid.
  2. You need use --> instead of ->

Here is my test on my computer:

Code:
image

Result:
image

If still not working, can you try to use TEST.md which should be under the plugin installed folder and test the result?

@chris2fr
Copy link
Author

The issue was with the mermaid call. instead of the chart call. Many Markdown syntaxi allow for the ```mermaid syntax.

The other issue is from my Graphviz/Dot days.... Good catch. Thanks.

@D0n9X1n
Copy link
Owner

D0n9X1n commented Feb 21, 2021

I see, when I wrote this plugin, there were few markdown syntaxi supported that feature so that I use chart to represent this.

I just submit a commit to support this keyword, you can update and try it.

See https://github.com/D0n9X1n/markdown-preview.vim#for-flowcharts

@chris2fr
Copy link
Author

All Good for Mermaid.
I would like to test further for Windows compatibility in order to take down the message about discouraging in Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants