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
657 stars 120 forks source link

Time-based Gantt charts error on render #194

Closed NorthboundPaddler closed 1 year ago

NorthboundPaddler commented 1 year ago

Upon updating my VScode extension to the new V1.18.0, my time-based Gantt charts fail to render. Here's an example code block that fails to render in the V1.18.0 extension (an also in GitHub apparently...):

gantt
dateFormat h:ma
axisFormat %I %p
Daily Review : 7:00am, 60m
Task 1 : 3h 
Task 2 : 30m 
Task 3 : 11:30am, 1h
Task 4 : 1h
Task 5 : 90m
Task 6 : 15m
Task 7 : 3:15pm, 15m

The error code received is: Invalid date:7:00am

This issue for me is resolved by reverting my VScode extension back to V1.17.7 and reloading VScode. This may be due to some issue in the way I format my Gantt chart using times, but I figured I could bring this up for review. Thanks for your work on this extension!

mjbvz commented 1 year ago

Does it work correctly if you use mermaid 10.0.2 directly?

mjbvz commented 1 year ago

Possibly https://github.com/mermaid-js/mermaid/issues/4165

NorthboundPaddler commented 1 year ago

@mjbvz Thank you for getting back to me on this... There must have been some sort of issue in my local environment. I can't reproduce this issue anymore using the snippet I showed above. I've tried on two different installs of VScode and neither one has issues anymore. I appreciate your time to look into this.