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

gitgraph / init pattern for non-default mainbranch name fails.. #195

Closed byronfa closed 10 months ago

byronfa commented 1 year ago

I was trying to use this example from mermaid documentation, and it appears non-functional in the plugin.. 'am I missing something? Seems to generally understand that there's a new branch, but merging from it later doesn't work.

%%{init: { 'logLevel': 'debug', 'theme': 'base', 'gitGraph': {'showBranches': true, 'showCommitLabel':true,'mainBranchName': 'MetroLine1'}} }%%
      gitGraph
        commit id:"NewYork"
        commit id:"Dallas"
        branch MetroLine2
        commit id:"LosAngeles"
        commit id:"Chicago"
        commit id:"Houston"
        branch MetroLine3
        commit id:"Phoenix"
        commit type: HIGHLIGHT id:"Denver"
        commit id:"Boston"
        checkout MetroLine1
        commit id:"Atlanta"
        merge MetroLine3
        commit id:"Miami"
        commit id:"Washington"
        merge MetroLine2 tag:"MY JUNCTION"
        commit id:"Boston"
        commit id:"Detroit"
        commit type:REVERSE id:"SanFrancisco"
axlee39 commented 1 year ago

This is the error message the preview gives:

Trying to checkout branch which is not yet created. (Help try using "branch MetroLine1")

mjbvz commented 10 months ago

Seems to be fixed in v1.21.0 of this extension which includes mermaid 10.6.1

Image