-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Spaces in subgraph titles no longer render in Mermaid 8.2.3 #895
Comments
This problem was not in 8.0.0, but seems to have been introduced in 8.1.0 via #845. |
@stanhu Wrap the title with double quotes and it will work |
You need to write "Mobile Unit" with Quotes |
Right, this surprised a number of our users. I asked whether we can preserve backwards compatibility: #845 (comment) |
Let move this here. I encourage backwards compatability and think this needs some investigating. I will reopen this issue for this discussion. |
Thinking aloud: So after doing a bit of research. In this case we should consider the text a title under the assumption we don't see the id[*] syntax. Known details
Assumptions:
So these are the possible formats... %% No style id and considered text
subgraph "a b"
subgraph old style that is broken
subgraph a-b-c
%% with style id
subgraph uid1[text of doom]
subgraph uid2["text of doom"]
subgraph uid3[abcdef]
These are the different types of things that can technically exist. (not jijson)
|
It should be possible to handle the "old style that is broken" as long as it does not contain a bracket. |
Fixed as of v 8.2.4 |
for those that stumble upon the same problem while linking subgraphs in a flowchart as such:
I've found the examples given here in this issue helpful #895 (comment) so I ended up with:
|
Describe the bug
Using a title with spaces results in the error:
To Reproduce
Use the sample graph: https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoiZ3JhcGggQlQ7XG5cbiAgdmV0cm9uaWNzIC0tLSB1aHVyYTtcbiAgb2J1IC0tLSB1aHVyYTtcbiAgZG9uZ2xlIC0tLSB1aHVyYTtcbiAga2Fma2EgLS0tIHVodXJhO1xuICB4bXBwIC0tLSB1aHVyYTtcbiAga2Fma2EgLS0tIHRvbGw7XG4gIGthZmthIC0tLSB0ZWxlO1xuXG4gIHN1YmdyYXBoIE1vYmlsZSBVbml0c1xuICAgIHZldHJvbmljc1tWZXRyb25pY3NdO1xuICAgIG9idVtUb2xsIE9CVV07XG4gICAgZG9uZ2xlW0RvbmdsZV07XG4gIGVuZFxuXG4gIHN1YmdyYXBoIFwiVWh1cmEgQ2x1c3RlclwiXG4gICAgdWh1cmFbVWh1cmFdO1xuICAgIGNvbnN1bFtDb25zdWxdO1xuICAgIGNpZnNbU2hhcmVkIEZpbGVzeXN0ZW1dO1xuICAgIGNvbnN1bCAtLS0gdWh1cmE7XG4gICAgdWh1cmEgLS0tIGNpZnM7XG4gIGVuZFxuXG4gIHN1YmdyYXBoIEludGVyZmFjZVxuICAgIGthZmthW0thZmthXTtcbiAgICB4bXBwW1hNUFBdO1xuICBlbmRcblxuICBzdWJncmFwaCBDbGllbnRzXG4gICAgdG9sbFtUb2xsIFBsYXRmb3JtXTtcbiAgICB0ZWxlW1RlbGVtYXRpY3NdO1xuICBlbmQiLCJtZXJtYWlkIjp7InRoZW1lIjoiZGVmYXVsdCJ9fQ/error/UGFyc2UgZXJyb3Igb24gbGluZSAxMToKLi4uOyAgc3ViZ3JhcGggTW9iaWxlIFVuaXRzICAgIHZldHJvbmljcwotLS0tLS0tLS0tLS0tLS0tLS0tLS1eCkV4cGVjdGluZyAnU0VNSScsICdORVdMSU5FJywgJ0VPRicsICdESVInLCAnRE9XTicsICdTUVMnLCAnTUlOVVMnLCAnTlVNJywgJ0NPTU1BJywgJ0FMUEhBJywgJ0NPTE9OJywgJ0JSS1QnLCAnRE9UJywgJ1BVTkNUVUFUSU9OJywgJ1VOSUNPREVfVEVYVCcsICdQTFVTJywgJ0VRVUFMUycsICdNVUxUJywgZ290ICdTUEFDRSc
Expected behavior
Subgraphs render.
Screenshots
Desktop (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: