Fix for issue #46, slashes in text

This commit is contained in:
knsv
2014-12-13 21:10:50 +01:00
parent 7fc2a0a544
commit 28594138e0
7 changed files with 35 additions and 32 deletions

View File

@@ -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;');