Skip to content

Dash character in names breaks the Mermaid diagram output. #183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
JBBianchi opened this issue Feb 19, 2024 · 0 comments · Fixed by #184
Closed

Dash character in names breaks the Mermaid diagram output. #183

JBBianchi opened this issue Feb 19, 2024 · 0 comments · Fixed by #184

Comments

@JBBianchi
Copy link
Member

JBBianchi commented Feb 19, 2024

What happened:
States with dash in the name such as:

{
   "id": "helloworld",
   "version": "1.0.0",
   "specVersion": "0.8",
   "name": "Hello World Workflow",
   "description": "Inject Hello World",
   "start": "hello-state",
   "states": [
      {
         "name": "hello-state",
         "type": "inject",
         "data": {
            "result": "Hello World!"
         },
         "end": true
      }
   ]
}

break the Mermaid output produced by new MermaidDiagram(workflow).sourceCode();

What you expected to happen:
A valid mermaid graph.

How to reproduce it:
Try the provided workflow in https://serverlessworkflow.io/editor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant