We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
The mermaid exporter crashes when there's a shape attribute on a node.
shape
This is due to this code: https://github.com/emicklei/dot/blob/master/mermaid.go#L82-L84
Which expect the shape attribute to be of type shape where it can not be. This type is always string.
string
This can be easily reproduced with:
graph := dot.NewGraph(dot.Directed) graph.Node("A").Box() graph.Edge(graph.Node("A"), graph.Node("B")) fmt.Println(dot.MermaidGraph(graph, dot.MermaidTopDown))
Which causes the following error:
panic: interface conversion: interface {} is string, not dot.shape goroutine 1 [running]: github.com/emicklei/dot.diagramGraph(0xc0000a8000, 0xc00007e020) /home/john/gocode/pkg/mod/github.com/emicklei/dot@v1.6.3/mermaid.go:83 +0xb94 github.com/emicklei/dot.diagram(0xc0000a8000, {0x4bd97a, 0x5}, 0x1) /home/john/gocode/pkg/mod/github.com/emicklei/dot@v1.6.3/mermaid.go:67 +0x545 github.com/emicklei/dot.MermaidGraph(...) /home/john/gocode/pkg/mod/github.com/emicklei/dot@v1.6.3/mermaid.go:39 main.main() /home/john/Documents/dotbug/test.go:14 +0x3b9 exit status 2
The text was updated successfully, but these errors were encountered:
thank you for reporting this. I will work on a solution
Sorry, something went wrong.
handle node shape constant and string, issue #40
80a4663
I confirm that release 1.6.4 seems to fix the issue.
Your reactivity is really impressive ! Thanks a lot for your help and for this awesome package.
No branches or pull requests
The mermaid exporter crashes when there's a
shape
attribute on a node.This is due to this code: https://github.com/emicklei/dot/blob/master/mermaid.go#L82-L84
Which expect the
shape
attribute to be of typeshape
where it can not be. This type is alwaysstring
.This can be easily reproduced with:
Which causes the following error:
The text was updated successfully, but these errors were encountered: