Skip to content

Commit

Permalink
Fix for issue #46, slashes in text
Browse files Browse the repository at this point in the history
  • Loading branch information
knsv committed Dec 13, 2014
1 parent 7fc2a0a commit 2859413
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 32 deletions.
22 changes: 9 additions & 13 deletions dist/mermaid.full.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/mermaid.full.min.js

Large diffs are not rendered by default.

22 changes: 9 additions & 13 deletions dist/mermaid.slim.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/mermaid.slim.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/diagrams/flowchart/parser/flow.jison
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|
[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]]|
[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|
[\uFFD2-\uFFD7\uFFDA-\uFFDC_]
[\uFFD2-\uFFD7\uFFDA-\uFFDC_\/]
return 'ALPHA';
"|" return 'PIPE';
"(" return 'PS';
Expand Down
2 changes: 1 addition & 1 deletion src/diagrams/flowchart/parser/flow.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions src/diagrams/flowchart/parser/flow.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,17 @@ describe('when parsing ',function(){

expect(edges[0].type).toBe('arrow_cross');
});

it('should handle text on edges with space',function(){
var res = flow.parser.parse('graph TD;A--x|text with / should work|B;');

var vert = flow.parser.yy.getVertices();
var edges = flow.parser.yy.getEdges();


expect(edges[0].text).toBe('text with / should work');
});

it('should handle text on edges with space CAPS',function(){
var res = flow.parser.parse('graph TD;A--x|text including CAPS space|B;');

Expand Down

0 comments on commit 2859413

Please sign in to comment.