Mermaid-Chart / vscode-mermaid-preview

Previews Mermaid diagrams
MIT License
142 stars 15 forks source link

Preview Mermaid Diagram from .mmd fails #51

Closed cnelsonakgov closed 6 years ago

cnelsonakgov commented 6 years ago

Expected behavior

sequenceDiagram
  participant A as Azure Application
  participant E as ESB
  Note left of A: User session <br> established
  A->>E: Request REST endpoint
  A-->>E: Provide Basic Auth Token
  E->>E: Check token against DHSS AD
  E->>A: Return JSON payload
  Note right of E: Channel between <br> Azure and ESB <br> secured with Basic <br> Auth over TLS

I save a Mermaid diagram as a .mmd file. When I try to Review Mermaid Diagram I see the preview

Actual behavior

I save Mermaid diagram a .mmd file. When I try to Review Mermaid Diagram I get and error command 'extension.previewMermaidDiagram' not found. Preview works fine for the same diagram when embedded in a markdown diagram.

Include:

vstirbu commented 6 years ago

I'm not able to replicate the behaviour on my side. Got the following result: screen shot 2018-05-18 at 8 28 25

Can you reinstall the plugin? Is there more info in the console (Help > Toggle Developer Tools)?

cnelsonakgov commented 6 years ago

I reinstalled the plugin, but it still behaves in the same manner. The Developer Tools Console has quite a bit of detail but I'm not sure what would be helpful. Here is a quick snippet: image

vstirbu commented 6 years ago

Seems that there is a parsing error in the loads file that manifests on Windows.

Is there anything in the console when you see the mermaid diagram in a markdown file? When you try to visualise the .mmd file after the markdown does it work?

cnelsonakgov commented 6 years ago

Looks like there was an error on the disk -- corrupted files in the the extension folder. Uninstalling it was not enough; I had to also go into the ~/.vscode/extensions/ folder and remove the directory for the extension. Reinstalled and everything seems to work again. Thanks for your assistance.