mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-19 23:39:50 +02:00
Added support for nested subgraphs in grammar, part 1 of issue #161
This commit is contained in:
@@ -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;');
|
||||
|
||||
|
Reference in New Issue
Block a user