mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-08 23:04:16 +01:00
Merge remote-tracking branch 'origin/master'
# Conflicts: # dist/mermaid.js # dist/mermaid.min.js # dist/mermaid.slim.js # dist/mermaid.slim.min.js # dist/mermaidAPI.js # dist/mermaidAPI.slim.js # dist/mermaidAPI.slim.min.js # package.json
This commit is contained in:
@@ -21,7 +21,7 @@
|
|||||||
"click" return 'CLICK';
|
"click" return 'CLICK';
|
||||||
"graph" return 'GRAPH';
|
"graph" return 'GRAPH';
|
||||||
"subgraph" return 'subgraph';
|
"subgraph" return 'subgraph';
|
||||||
"end"\s* return 'end';
|
"end"\b\s* return 'end';
|
||||||
"LR" return 'DIR';
|
"LR" return 'DIR';
|
||||||
"RL" return 'DIR';
|
"RL" return 'DIR';
|
||||||
"TB" return 'DIR';
|
"TB" return 'DIR';
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -308,6 +308,18 @@ describe('when parsing ',function(){
|
|||||||
expect(edges[0].text).toBe('');
|
expect(edges[0].text).toBe('');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should handle node names with "end" substring',function(){
|
||||||
|
var res = flow.parser.parse('graph TD\nendpoint --> sender');
|
||||||
|
|
||||||
|
var vert = flow.parser.yy.getVertices();
|
||||||
|
var edges = flow.parser.yy.getEdges();
|
||||||
|
|
||||||
|
expect(vert['endpoint'].id).toBe('endpoint');
|
||||||
|
expect(vert['sender'].id).toBe('sender');
|
||||||
|
expect(edges[0].start).toBe('endpoint');
|
||||||
|
expect(edges[0].end).toBe('sender');
|
||||||
|
});
|
||||||
|
|
||||||
it('should handle open ended edges',function(){
|
it('should handle open ended edges',function(){
|
||||||
var res = flow.parser.parse('graph TD;A---B;');
|
var res = flow.parser.parse('graph TD;A---B;');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user