mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-20 15:59:51 +02:00
Removed STR remains and fixed whitespace issue for 'call' which lead to undesired whitespace in function names
This commit is contained in:
@@ -9,7 +9,6 @@
|
|||||||
|
|
||||||
/* string is used to detect blocks that are surrounded by double quotes. */
|
/* string is used to detect blocks that are surrounded by double quotes. */
|
||||||
/* copied from /src/diagrams/flowchart/parser/flow.jison */
|
/* copied from /src/diagrams/flowchart/parser/flow.jison */
|
||||||
%x string
|
|
||||||
%x click
|
%x click
|
||||||
%x href
|
%x href
|
||||||
%x callbackname
|
%x callbackname
|
||||||
@@ -25,7 +24,7 @@
|
|||||||
<href>[\s\n] this.popState(); /* e.g. return https://example.com for 'href https://example.com' */
|
<href>[\s\n] this.popState(); /* e.g. return https://example.com for 'href https://example.com' */
|
||||||
<href>[^\s\n]* return 'href'; /* the specified word must not contain whitespace */
|
<href>[^\s\n]* return 'href'; /* the specified word must not contain whitespace */
|
||||||
|
|
||||||
"call" this.begin("callbackname");
|
"call"[\s]+ this.begin("callbackname");
|
||||||
<callbackname>\( this.popState(); this.begin("callbackargs");
|
<callbackname>\( this.popState(); this.begin("callbackargs");
|
||||||
<callbackname>[^(]* return 'callbackname';
|
<callbackname>[^(]* return 'callbackname';
|
||||||
<callbackargs>\) this.popState();
|
<callbackargs>\) this.popState();
|
||||||
|
Reference in New Issue
Block a user