Allow underscore in classnames
See original GitHub issueI’m trying to create a class diagramm but mermaid crashes because I have underscores in my class name. Please add support for underscores as it is a common character here in an old project.
classDiagramTEST_ADDRESS <|-- TEST_ADDRESSES --------------^ Expecting 'NEWLINE', 'EOF', 'LABEL', 'STRUCT_START', 'STR', 'AGGREGATION', 'EXTENSION', 'COMPOSITION', 'DEPENDENCY', 'LINE', 'DOTTED_LINE', 'UNICODE_TEXT', 'NUM', 'ALPHA', got 'PUNCTUATION' at L.parseError (file:///C:/Users/username/Desktop/yarn/yarn-1.5.1/ProgramFilesFolder/Yarn/node_modules/mermaid.cli/mermaid.min.js:1:387053) at L.parse (file:///C:/Users/username/Desktop/yarn/yarn-1.5.1/ProgramFilesFolder/Yarn/node_modules/mermaid.cli/mermaid.min.js:1:388219) at Object.e.draw (file:///C:/Users/username/Desktop/yarn/yarn-1.5.1/ProgramFilesFolder/Yarn/node_modules/mermaid.cli/mermaid.min.js:1:702705) at Object.render (file:///C:/Users/username/Desktop/yarn/yarn-1.5.1/ProgramFilesFolder/Yarn/node_modules/mermaid.cli/mermaid.min.js:1:760781) at s (file:///C:/Users/username/Desktop/yarn/yarn-1.5.1/ProgramFilesFolder/Yarn/node_modules/mermaid.cli/mermaid.min.js:8:233) at Object.init (file:///C:/Users/username/Desktop/yarn/yarn-1.5.1/ProgramFilesFolder/Yarn/node_modules/mermaid.cli/mermaid.min.js:8:318) at <anonymous>:17:20 at ExecutionContext.evaluateHandle (C:\Users\username\Desktop\yarn\yarn-1.5.1\ProgramFilesFolder\Yarn\node_modules\puppeteer\lib\ExecutionContext.js:79:13) at <anonymous> at process._tickCallback (internal/process/next_tick.js:118:7) (node:17464) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:17464) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:10 (3 by maintainers)
Top GitHub Comments
this example works https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoiY2xhc3NEaWFncmFtXG5DbGFzczAxIDx8LS0gQXZlcnlMb25nQ2xhc3MgOiBDb29sXG5DbGFzczAxIDogc2l6ZSgpXG5DbGFzczAxIDogZ2V0X2ZpbGUoKVxuQ2xhc3MwMSA6IGludCBjaGltcFxuQ2xhc3MwMSA6IGludCB2YXJfd2l0aF91bmRlcnNjb3Jlc1xuQ2xhc3MwMSA6IGludCBnb3JpbGxhIiwibWVybWFpZCI6eyJ0aGVtZSI6ImRlZmF1bHQifX0
this example doesn’t work https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoiY2xhc3NEaWFncmFtXG5DbGFzc18wMSA8fC0tIEF2ZXJ5TG9uZ0NsYXNzIDogQ29vbFxuQ2xhc3NfMDEgOiBzaXplKClcbkNsYXNzXzAxIDogZ2V0X2ZpbGUoKVxuQ2xhc3NfMDEgOiBpbnQgY2hpbXBcbkNsYXNzXzAxIDogaW50IHZhcl93aXRoX3VuZGVyc2NvcmVzXG5DbGFzc18wMSA6IGludCBnb3JpbGxhIiwibWVybWFpZCI6eyJ0aGVtZSI6ImRlZmF1bHQifX0/error/UGFyc2UgZXJyb3Igb24gbGluZSAyOgpjbGFzc0RpYWdyYW1DbGFzc18wMSA8fC0tIEF2ZXJ5TG9uZ0NsCi0tLS0tLS0tLS0tLS0tLS0tXgpFeHBlY3RpbmcgJ05FV0xJTkUnLCAnRU9GJywgJ0xBQkVMJywgJ1NUUlVDVF9TVEFSVCcsICdTVFInLCAnQUdHUkVHQVRJT04nLCAnRVhURU5TSU9OJywgJ0NPTVBPU0lUSU9OJywgJ0RFUEVOREVOQ1knLCAnTElORScsICdET1RURURfTElORScsICdVTklDT0RFX1RFWFQnLCAnTlVNJywgJ0FMUEhBJywgZ290ICdQVU5DVFVBVElPTic
If anyone’s working on this… also, check this very similar one: #770