mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-17 03:04:07 +01:00
Fix for issue #84
This commit is contained in:
@@ -37,7 +37,7 @@
|
|||||||
\+ return 'PLUS';
|
\+ return 'PLUS';
|
||||||
\% return 'PCT';
|
\% return 'PCT';
|
||||||
\= return 'EQUALS';
|
\= return 'EQUALS';
|
||||||
[\u0021-\u0027\u002A-\u002E\u003F\u0041-\u005A\u005C\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|
|
[\u0021-\u0027\u002A-\u002E\u003F\u0041-\u005A\u005C\u005F-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|
|
||||||
[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|
|
[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|
|
||||||
[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|
|
[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|
|
||||||
[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|
|
[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|
|
||||||
@@ -240,8 +240,6 @@ link: linkStatement arrowText
|
|||||||
{$5.text = $3;$$ = $5;}
|
{$5.text = $3;$$ = $5;}
|
||||||
| '--' SPACE text SPACE linkStatement SPACE
|
| '--' SPACE text SPACE linkStatement SPACE
|
||||||
{$5.text = $3;$$ = $5;}
|
{$5.text = $3;$$ = $5;}
|
||||||
| '--' text linkStatement SPACE
|
|
||||||
{$5.text = $3;$$ = $5;}
|
|
||||||
;
|
;
|
||||||
|
|
||||||
linkStatement: ARROW_POINT
|
linkStatement: ARROW_POINT
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -322,6 +322,17 @@ describe('when parsing ',function(){
|
|||||||
expect(edges[0].type).toBe('arrow_cross');
|
expect(edges[0].type).toBe('arrow_cross');
|
||||||
expect(edges[0].text).toBe('text including R TD space');
|
expect(edges[0].text).toBe('text including R TD space');
|
||||||
|
|
||||||
|
});
|
||||||
|
it('should handle `',function(){
|
||||||
|
var res = flow.parser.parse('graph TD;A--x|text including `|B;');
|
||||||
|
|
||||||
|
var vert = flow.parser.yy.getVertices();
|
||||||
|
var edges = flow.parser.yy.getEdges();
|
||||||
|
|
||||||
|
|
||||||
|
expect(edges[0].type).toBe('arrow_cross');
|
||||||
|
expect(edges[0].text).toBe('text including `');
|
||||||
|
|
||||||
});
|
});
|
||||||
it('should handle keywords',function(){
|
it('should handle keywords',function(){
|
||||||
var res = flow.parser.parse('graph TD;A--x|text including graph space|B;');
|
var res = flow.parser.parse('graph TD;A--x|text including graph space|B;');
|
||||||
|
|||||||
Reference in New Issue
Block a user