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

Multiple gitgraph don't render properly #160

Closed luckzylp closed 1 year ago

luckzylp commented 1 year ago

Hi,

Thank you very much for this excellent extension! Thanks again.

I updated Markdown Preview Mermaid Support to version v1.16.0 and found two problems,

  1. Finding that it still couldn't handle mindmap syntax, so I used the following file

https://github.com/mermaid-js/mermaid/tree/develop/docs/syntax/mindmap.md for testing (I modified the syntax problems in them before testing). mindmap.md

  1. Found that gitgraph works fine if there is only a single graph to process, but when there are multiple gitgraph to process, the preview interface keeps stuck and doesn't preview properly. My test file is as follows. gitgraph.md
mjbvz commented 1 year ago
  1. Mindmap support tracked by #153

  2. I will update the issue title to track the second issue (in the future, please open one GitHub issue for each bug you see, as this makes tracking issues easier)

mjbvz commented 1 year ago

For the gitGraph rendering issue, can you please add more details on what isn't working. Which graphs should I look at in your example file to see the bug?

luckzylp commented 1 year ago

I made a gif (The gif has been compressed but the file is still too big to upload to github)

https://drive.google.com/file/d/1Gx-z_YHneI9b5d3fI7fQ4DMv0Bxa-gNF/view?usp=share_link

to illustrate the whole process and uploaded my test files as follows,

gitgraph_test.md gitgraph.md

I also share my current environment in which this problem arises.

VS Code version: Code 1.73.1 (6261075646f055b99068d3688932416f2346dd3b, 2022-11-09T04:27:29.066Z) OS version: Windows_NT x64 10.0.22621 Modes: Sandboxed: No

System Info |Item|Value| |---|---| |CPUs|12th Gen Intel(R) Core(TM) i5-1240P (16 x 2112)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|undefined| |Memory (System)|15.69GB (6.41GB free)| |Process Argv|E:\\document\\mermaid --crash-reporter-id 548922f6-5112-4d86-b32f-3006cea6df33| |Screen Reader|no| |VM|0%|
Extensions (47) Extension|Author (truncated)|Version ---|---|--- Bookmarks|ale|13.3.1 project-manager|ale|12.7.0 Doxygen|bbe|1.0.0 toml|be5|0.6.0 markdown-mermaid|bie|1.16.0 markdown-preview-github-styles|bie|1.0.1 better-toml|bun|0.3.2 vscode-typora|cwe|2.9.1 vscode-markdownlint|Dav|0.48.1 ini-for-vscode|Dav|0.0.4 vscode-eslint|dba|2.2.6 rust-syntax|dus|0.6.1 vscode-ansi|ili|1.1.2 vscode-gnu-global|jay|0.3.5 vscode-todo-highlight|jgc|2.0.4 rainbow-csv|mec|3.4.0 python-path|mge|0.0.14 flake8|ms-|2022.6.0 isort|ms-|2022.8.0 python|ms-|2022.18.2 vscode-pylance|ms-|2022.11.40 jupyter|ms-|2022.9.1303220346 jupyter-keymap|ms-|1.0.0 jupyter-renderers|ms-|1.0.12 vscode-jupyter-cell-tags|ms-|0.1.6 vscode-jupyter-slideshow|ms-|0.1.5 remote-ssh|ms-|0.92.0 remote-ssh-edit|ms-|0.84.0 vscode-remote-extensionpack|ms-|0.23.0 cmake-tools|ms-|1.12.27 cpptools|ms-|1.13.6 hexeditor|ms-|1.9.9 remote-explorer|ms-|0.0.2 vscode-typescript-next|ms-|5.0.202211170 vsliveshare|ms-|1.0.5788 vsliveshare-audio|ms-|0.1.91 vsliveshare-pack|ms-|0.4.0 vscode-xml|red|0.22.0 highlight-words|rsb|0.1.4 rust-analyzer|rus|0.3.1309 partial-diff|ryu|1.4.3 crates|ser|0.5.10 markdown-preview-enhanced|shd|0.6.5 vscode-lldb|vad|1.8.1 vscodeintellicode|Vis|1.2.29 vscode-icons|vsc|12.0.1 markdown-all-in-one|yzh|3.5.0
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492cf:30256860 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263cf:30335440 pythondataviewer:30285071 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593cf:30376535 pythonvs932:30410667 cppdebug:30492333 vsclangdc:30486549 c4g48928:30535728 dsvsc012:30540252 azure-dev_surveyone:30548225 pyindex848:30577860 nodejswelcome1cf:30587006 282f8724:30602487 gswce1:30612156 3d0df643:30613357 dbltrim-noruby:30604474 89544117:30613380 fim-prod:30623723 ```

If you have any questions, please don't hesitate to let me know. Thanks.

mjbvz commented 1 year ago

Thanks @jay-zhou-yan

Can you please try disabling the markdown preview enhanced extension and test this using VS Code's built-in markdown preview? This extension only officially supports the built-in markdown preview. Your example files seem to work there

luckzylp commented 1 year ago

Thanks @mjbvz

I removed markdown preview enhanced extension and tested again I removed the SD plug-in and retested it, and found that the gitGraphpreview feature was normal.

It seems that the problem is caused by plug-in conflicts.