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
633 stars 114 forks source link

Mermaid not rendering in the preview #210

Closed mathomp4 closed 12 months ago

mathomp4 commented 1 year ago

I'm feeling kind of dumb here, but I can't seem to get this extension to work with even a simple case.

To wit, I have a test markdown file of:

## Test

```mermaid
graph TD;
    A-->B;
    A-->C;
    B-->D;
    C-->D;

but I see:

![Screenshot 2023-07-13 at 11 33 39 AM](https://github.com/mjbvz/vscode-markdown-mermaid/assets/2982494/1abd87fe-bda7-42e7-add2-f49771c29f92)

And the only "Mermaid" related extensions I have are this in v1.19.0 and a syntaxer, but disabling the latter doesn't seem to help.

I'm sure I've done something bad, but I'm also mainly a Fortran programmer that uses Vim so VS Code often confuses me. VS Code extensions, doubly so!

VSCode Info:
Version: 1.80.0 (Universal)
Commit: 660393deaaa6d1996740ff4880f1bad43768c814
Date: 2023-07-04T13:39:33.766Z
Electron: 22.3.14
ElectronBuildId: 21893604
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Darwin arm64 22.5.0 
mjbvz commented 1 year ago

What if you disable all other extensions except this one?

mathomp4 commented 1 year ago

@mjbvz I just tried that. Disabled everything and then reenabled this extension, but:

Screenshot 2023-07-14 at 6 22 21 PM

Note that it does render on GitHub, see https://github.com/GEOS-ESM/GEOSgcm/wiki/Running-an-AMIP-Experiment#the-flow-of-the-gcm_runj-script

ETA: And now I enabled all of them and I realize I should uninstall extensions and not just disable if I'm using them. Sweet mercy, my editor is crazy with all of them on! 😄

mjbvz commented 12 months ago

Unfortunately I can't reproduce this issue

Can you try viewing the developer tools to see if there are any errors. In the VS Code command palette, run Developer: Toggle developer tools. This should show the developer tools. Look in the console for potentially interesting error messages

mathomp4 commented 12 months ago

@mjbvz Well, there were 35 messages when I started up:

vscode-app-1689637103682.log

Your name is in some of them...but I also have like 10 of your extensions loaded 😄

This all seems to be startup. If I clear the console and open the markdown preview, I get this log:

vscode-app-1689637161365.log

Nothing too exciting. 😦

mjbvz commented 12 months ago

Thanks. This is strange

What if you try the latest VS Code insiders build? This will also have a fresh set of extensions and users settings which may fix this

mathomp4 commented 12 months ago

Thanks. This is strange

What if you try the latest VS Code insiders build? This will also have a fresh set of extensions and users settings which may fix this

Ooh. We have success:

Screenshot 2023-07-18 at 6 40 38 PM

Though, now it's going to get to me that it's in...mono? I wonder if there's a way to get the sort of nice lilac color I see on GitHub:

Screenshot 2023-07-18 at 6 41 13 PM

And, of course, I have to figure out how I can get all my extensions from the Stable to the Insiders...

mjbvz commented 12 months ago

Glad it works

It's somewhat unlikely (but always possible) that insiders itself fixed things. More likely one of the extensions or settings you have in stable was causing issue. Try going through those again to see if you can track down the root cause in case anyone else hits this

mathomp4 commented 12 months ago

ooh. I might have found it! I started adding in my Stable extensions one-by-one and when I installed--or rather enabled--Markdown Shiki:

https://marketplace.visualstudio.com/items?itemName=bierner.markdown-shiki

it failed!

Maybe this will help you figure something out?