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

comment characters %% cause parse error #141

Closed
EndangeredMassa opened this issue Mar 18, 2015 · 2 comments
Closed

comment characters %% cause parse error #141

EndangeredMassa opened this issue Mar 18, 2015 · 2 comments
Labels
Type: Bug / Error Something isn't working or is incorrect
Milestone

Comments

@EndangeredMassa
Copy link

In the examples, I often see comments that describe the example using lines that start with %%. When I try to use these examples with the cli, I get a parse error. If I remove just the comment line, everything works fine.

Example:

%% Example diagram
graph LR
    A[Square Rect] -- Link text --> B((Circle))
    A --> C(Round Rect)
    B --> D{Rhombus}
    C --> D

Versions:

$ phantomjs --version
1.9.0
$ node -v
v0.10.36

Error:

$ mermaid chart.mm 
CONSOLE: Mermaid Syntax error: (from line #undefined in "undefined")
CONSOLE: Parse error on line 1:
%% Example diagramg
^
Expecting 'GRAPH', got 'PCT' (from line #undefined in "undefined")
TypeError: 'undefined' is not an object (evaluating 'action[0]')

  ../dist/mermaid.full.js:27365 in parse
  ../dist/mermaid.full.js:25768
  ../dist/mermaid.full.js:30832
  ../dist/mermaid.full.js:30888
  phantomjs://webpage.evaluate():24 in executeInPage
  phantomjs://webpage.evaluate():30
  phantomjs://webpage.evaluate():30
PHANTOM ERROR: TypeError: 'null' is not an object (evaluating 'element.setAttribute')
TRACE:
 -> /home/sean/.nvm/v0.10.36/lib/node_modules/mermaid/lib/phantomscript.js: 156 (in function resolveSVGElement)
 -> /home/sean/.nvm/v0.10.36/lib/node_modules/mermaid/lib/phantomscript.js: 76
@knsv
Copy link
Collaborator

knsv commented Mar 19, 2015

Hello! Thank for bringing this to my attention! It should work but does not and I can reproduce the issue.

@knsv
Copy link
Collaborator

knsv commented Oct 4, 2015

Still an issue for sequenceDiagrams.

@knsv knsv added the Type: Bug / Error Something isn't working or is incorrect label Oct 4, 2015
@knsv knsv added this to the 0.5.3 milestone Oct 4, 2015
@knsv knsv closed this as completed in #312 Mar 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

No branches or pull requests

2 participants