Mermaid-Chart / vscode-mermaid-preview

Previews Mermaid diagrams
MIT License
142 stars 15 forks source link

Support for gitGraph #78

Closed apetitbois closed 5 years ago

apetitbois commented 5 years ago

Expected behaviour

gitGraph:
options
{
  "nodeSpacing": 150,
  "nodeRadius": 10
}
end
  commit
  branch newbranch
  checkout newbranch
  commit
  commit
  checkout master
  commit
  commit
  merge newbranch

This does not render. But if I generate the PDF/HTML from a browser, this actually renders fine.

This is what is seen in the preview: preview

This is what is seen when rendered as HTML rendered

vstirbu commented 5 years ago

The plugin should use the latest mermaid from npm registry. Which version of mermaid are you using in the browser?

apetitbois commented 5 years ago
<script type="text/javascript" src="file:///C:\Users\[...]\.vscode\extensions\shd101wyy.markdown-preview-enhanced-0.4.1\node_modules\@shd101wyy\mume\dependencies\mermaid\mermaid.min.js" charset="UTF-8"></script>
vstirbu commented 5 years ago

I've tried your example and this is what I get:

Screenshot 2019-06-13 at 9 47 33

There are some problems with the rendering after the first draw of the diagram but it is not the problem that you report. Your snippet points to shd101wyy.markdown-preview-enhanced, which is another plugin.

vstirbu commented 5 years ago

I've done further investigation on this type of diagram and the results are not encouraging.

gitGraph is still experimental in mermaid and the resulting SVG lacks elements that would facilitate handling it properly in this plugin:

Considering this I propose to close this issue and come back when the mermaid support matures.