#4012 Allowing multiple lines before the mindmap statement

This commit is contained in:
Knut Sveidqvist
2023-01-20 10:18:26 +01:00
parent 3cd15cdcf2
commit 80903e427c
2 changed files with 20 additions and 1 deletions

View File

@@ -354,6 +354,18 @@ root
expect(mm.nodeId).toEqual('root');
expect(mm.children.length).toEqual(2);
const child = mm.children[0];
expect(child.nodeId).toEqual('A');
const child2 = mm.children[1];
expect(child2.nodeId).toEqual('B');
});
it('MMP-24 Handle rows above the mindmap declarations', function () {
let str = '\n \nmindmap\nroot\n A\n \n\n B';
mindmap.parse(str);
const mm = mindmap.yy.getMindmap();
expect(mm.nodeId).toEqual('root');
expect(mm.children.length).toEqual(2);
const child = mm.children[0];
expect(child.nodeId).toEqual('A');
const child2 = mm.children[1];