Added support for nested subgraphs in grammar, part 1 of issue #161

This commit is contained in:
knsv
2015-05-09 19:05:47 +02:00
parent 594e69dd93
commit ae6bb57cf5
5 changed files with 23 additions and 11 deletions

View File

@@ -357,6 +357,17 @@ describe('when parsing ',function(){
expect(edges[0].type).toBe('arrow');
});
it('should handle nested subgraphs',function(){
var str = 'graph TD\n' +
'A-->B\n' +
'subgraph myTitle\n\n' +
' c-->d \n\n' +
' subgraph inner\n\n e-->f \n end \n\n' +
'end\n';
var res = flow.parser.parse(str);
});
it('should handle subgraphs',function(){
var res = flow.parser.parse('graph TD\nA-->B\nsubgraph myTitle\nc-->d\nend;');