Skip to content
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

[Parser] Hyphen in participant name bring TypeError #74

Closed
sudodoki opened this issue Dec 28, 2014 · 3 comments
Closed

[Parser] Hyphen in participant name bring TypeError #74

sudodoki opened this issue Dec 28, 2014 · 3 comments
Milestone

Comments

@sudodoki
Copy link

If you have participant, whose name contain -, in sequence diagram, mermaid will fail with following message

TypeError: 'undefined' is not an object (evaluating 'action[0]')

  ../dist/mermaid.full.js:15352 in parse
  ../dist/mermaid.full.js:16236
  ../dist/mermaid.full.js:16466
  ../dist/mermaid.full.js:16517
  phantomjs://webpage.evaluate():23 in executeInPage
  phantomjs://webpage.evaluate():29
  phantomjs://webpage.evaluate():29
PHANTOM ERROR: TypeError: 'null' is not an object (evaluating 'element.setAttribute')
TRACE:
 -> /usr/local/lib/node_modules/mermaid/lib/phantomscript.js: 149 (in function resolveSVGElement)
 -> /usr/local/lib/node_modules/mermaid/lib/phantomscript.js: 69%

Mermaid version is 0.3.0
Phantomjs version is 1.9.8

@sudodoki sudodoki changed the title [Parser] [Parser] Hyphen in participant name bring TypeError Dec 28, 2014
@knsv
Copy link
Collaborator

knsv commented Jan 5, 2015

Been looking at this and it is a bit tricky to fix as the Hyphen is also involved in the signal type. It is possible to fix but would make the grammar much more complex. Perhaps we could encode it somehow?

knsv added a commit that referenced this issue Oct 4, 2015
…nstance is possible to represent a " with #quot; and a heart with #9829;. This as referenced in issue #74 and issue #193.
@knsv knsv added the Fixed label Oct 4, 2015
@knsv knsv added this to the 0.5.2 milestone Oct 4, 2015
@knsv
Copy link
Collaborator

knsv commented Oct 4, 2015

Fix for this issue was released in mermaid 0.5.2. Will close this now, let me know if you issues still remain.

@knsv knsv closed this as completed Oct 4, 2015
@sudodoki
Copy link
Author

sudodoki commented Oct 4, 2015

Thanks!

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

No branches or pull requests

2 participants