mermaid-filter
mermaid-filter copied to clipboard
Cannot Generate `gitGraph` Images
Hello,
I have set up Pandoc with mermaid-filter 1.4.6 from NPM. It works great with flowcharts, but generates a blank image when I try to use a gitGraph
. When I run it, I simply get empty/white images generated. I understand that gitGraph
is currently experimental, I just wanted to see whether I should expect it to work, and if not, whether anybody knows if that is an upcoming effort for mermaid-filter or the mermaid project itself.
Thanks!
I'm sorry, I stand corrected! Looks like I was using a bad example.
Good example (from gitGraph
documentation):
gitGraph:
options
{
"nodeSpacing": 150,
"nodeRadius": 10
}
end
commit
branch newbranch
checkout newbranch
commit
commit
checkout master
commit
commit
merge newbranch
Bad example (honestly can't remember where I found it, sorry):
gitGraph
commit
commit
branch develop
checkout develop
commit
commit
checkout main
merge develop
commit
commit
I am seeing an issue where the graph gets cut off where I am using it on a webpage, but that may be something I just have to fiddle with.
When I generate with png
, it looks OK (though perhaps a bit too wide):
When I generate with svg
, it gets cut off:
I'm using mermaid-filter 1.4.6 and this chart exports as a blank white graph (regardless of options like theme) in my pandoc HTML output.
```{.mermaid theme=forest}
gitGraph:
commit
commit
branch feature/x
checkout feature/x
commit
commit
checkout main
merge feature/x
branch feature/y
checkout feature/y
commit
commit
checkout main
merge feature/y
branch release/x
checkout release/x
commit tag: "X.X.X-qualifier.X"
checkout main
branch feature/z
checkout feature/z
commit
commit
checkout main
merge feature/z
```
gitGraph:
commit
commit
branch feature/x
checkout feature/x
commit
commit
checkout main
merge feature/x
branch feature/y
checkout feature/y
commit
commit
checkout main
merge feature/y
branch release/x
checkout release/x
commit tag: "X.X.X-qualifier.X"
checkout main
branch feature/z
checkout feature/z
commit
commit
checkout main
merge feature/z
Can you try out v1.4.7 from npm? I added the example to the e2e test file in the repo. Please reopen if you run into issues