-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Bug/1478 er diagram unicode support #5146
base: develop
Are you sure you want to change the base?
Bug/1478 er diagram unicode support #5146
Conversation
✅ Deploy Preview for mermaid-js ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #5146 +/- ##
========================================
Coverage 79.37% 79.37%
========================================
Files 166 166
Lines 13878 13878
Branches 705 705
========================================
Hits 11016 11016
Misses 2710 2710
Partials 152 152
Flags with carried forward coverage won't be shown. Click here to find out more. |
What we normally do to support unicode is quoted strings, like below. mermaid/packages/mermaid/src/diagrams/pie/parser/pie.jison Lines 30 to 33 in 52bb31b
I'm not sure of the implications of the suggested approach of adding the unicode character range. @nirname @aloisklink any potential issues? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After having a look at the JISON file for ER Diagrams, I believe every field that uses 'ALPHANUM'
already supports 'ENTITY_NAME'
(which is confusingly named), which does support unicode characters, as long as they're quoted, e.g.
```mermaid
erDiagram
"🌋" ||--o{ "Hiking Trail 🥾" : "contains 🧭"
"🌋" {
string name "name: 名"
float height "my 📈"
string sector
}
```
renders as
erDiagram
"🌋" ||--o{ "Hiking Trail 🥾" : "contains 🧭"
"🌋" {
string name "name: 名"
float height "my 📈"
string sector
}
Therefore, this change isn't needed. However, the documentation for this is missing, if you want to add it @Mikek16.
Both attribute types and attribute names don't support unicode.
It would be nice if we could somehow also throw a nicer error message when somebody tries to use unicode characters and they're not using the ""
syntax, but I don't know if jison
has support for that.
But as @aloisklink suggested, I would rather have documentation updated first, and the see how many people still encounter this problem |
@Mikek16 gentle remidner, just want to know if there is any further work expected on this? |
📑 Summary
Resolves #1478
📏 Design Decisions
add literal unicode character range to ALPHANUM regex