mermaid-js / mermaid

Generation of diagrams like flowcharts or sequence diagrams from text in a similar manner as markdown
https://mermaid.js.org
MIT License
72.77k stars 6.65k forks source link

When there is a Chinese symbol in the flowchart, it will crash。 #238

Closed Arnoldnuo closed 9 years ago

Arnoldnuo commented 9 years ago

wrong:

graph TD
A[a,a]

right:

graph TD
A[a,a]
knsv commented 9 years ago

Put the characters within quotes and it will work, as in: graph TB A["这工作"]

Example: http://knsv.github.io/mermaid/live_editor/#/edit/Z3JhcGggVEIKICBBWyLov5nlt6XkvZwiXQ

Arnoldnuo commented 9 years ago

@knsv thank you, I'll remenber to add quotes when I use flowchart。

tylerlong commented 7 years ago

Now it works even without quotes: https://mermaidjs.github.io/mermaid-live-editor/#/edit/Z3JhcGggVEIKICBBW-i_meW3peS9nF0

But it is a good practice to put no-ascii characters inside quotes.