mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
Give STR token higher precedence
This commit is contained in:
parent
d05d249080
commit
58b2b0993a
@ -50,6 +50,10 @@ accDescr\s*"{"\s* { this.begin("acc_descr_multili
|
|||||||
"classDiagram" return 'CLASS_DIAGRAM';
|
"classDiagram" return 'CLASS_DIAGRAM';
|
||||||
"[*]" return 'EDGE_STATE';
|
"[*]" return 'EDGE_STATE';
|
||||||
|
|
||||||
|
<string>["] this.popState();
|
||||||
|
<string>[^"]* return "STR";
|
||||||
|
<*>["] this.begin("string");
|
||||||
|
|
||||||
<INITIAL,namespace>"namespace" { this.begin('namespace'); return 'NAMESPACE'; }
|
<INITIAL,namespace>"namespace" { this.begin('namespace'); return 'NAMESPACE'; }
|
||||||
<namespace>\s*(\r?\n)+ { this.popState(); return 'NEWLINE'; }
|
<namespace>\s*(\r?\n)+ { this.popState(); return 'NEWLINE'; }
|
||||||
<namespace>\s+ /* skip whitespace */
|
<namespace>\s+ /* skip whitespace */
|
||||||
@ -110,10 +114,6 @@ Function arguments are optional: 'call <callback_name>()' simply executes 'callb
|
|||||||
<generic>[^~]* return "GENERICTYPE";
|
<generic>[^~]* return "GENERICTYPE";
|
||||||
<INITIAL,class>"~" this.begin("generic");
|
<INITIAL,class>"~" this.begin("generic");
|
||||||
|
|
||||||
<string>["] this.popState();
|
|
||||||
<string>[^"]* return "STR";
|
|
||||||
<*>["] this.begin("string");
|
|
||||||
|
|
||||||
<bqstring>[`] this.popState();
|
<bqstring>[`] this.popState();
|
||||||
<bqstring>[^`]+ return "BQUOTE_STR";
|
<bqstring>[^`]+ return "BQUOTE_STR";
|
||||||
<*>[`] this.begin("bqstring");
|
<*>[`] this.begin("bqstring");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user