mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
Revert "Multiline comments"
This commit is contained in:
parent
2b58a2a176
commit
94ace2348f
@ -9,8 +9,7 @@
|
||||
%x string generic struct
|
||||
|
||||
%%
|
||||
\%\%[^\n]*\n* /* skip comments */
|
||||
\%\%\*((.|\n)*)\*\%\% /* multiline skip comments */
|
||||
\%\%[^\n]*\n* /* do nothing */
|
||||
\n+ return 'NEWLINE';
|
||||
\s+ /* skip whitespace */
|
||||
"classDiagram" return 'CLASS_DIAGRAM';
|
||||
|
@ -10,8 +10,7 @@
|
||||
%x dir
|
||||
%x vertex
|
||||
%%
|
||||
\%\%[^\n]*\n* /* skip comments */
|
||||
\%\%\*((.|\n)*)\*\%\% /* multiline skip comments */
|
||||
\%\%[^\n]*\n* /* do nothing */
|
||||
["] this.begin("string");
|
||||
<string>["] this.popState();
|
||||
<string>[^"]* return "STR";
|
||||
|
@ -17,7 +17,6 @@
|
||||
\s+ /* skip whitespace */
|
||||
\#[^\n]* /* skip comments */
|
||||
\%%[^\n]* /* skip comments */
|
||||
\%\%\*((.|\n)*)\*\%\% /* multiline skip comments */
|
||||
|
||||
/*
|
||||
---interactivity command---
|
||||
|
@ -18,7 +18,6 @@
|
||||
\s+ /* skip all whitespace */
|
||||
\#[^\n]* /* skip comments */
|
||||
\%%[^\n]* /* skip comments */
|
||||
\%\%\*((.|\n)*)\*\%\% /* multiline skip comments */
|
||||
"gitGraph" return 'GG';
|
||||
"commit" return 'COMMIT';
|
||||
"branch" return 'BRANCH';
|
||||
|
@ -12,8 +12,7 @@
|
||||
%}
|
||||
|
||||
%%
|
||||
\%\%[^\n]* /* skip comments */
|
||||
\%\%\*((.|\n)*)\*\%\% /* multiline skip comments */
|
||||
\%\%[^\n]* /* do nothing */
|
||||
\s+ /* skip whitespace */
|
||||
"pie" return 'pie' ;
|
||||
[\s\n\r]+ return 'NL' ;
|
||||
|
@ -26,7 +26,6 @@
|
||||
<ID,ALIAS,LINE>((?!\n)\s)+ /* skip same-line whitespace */
|
||||
<INITIAL,ID,ALIAS,LINE>\#[^\n]* /* skip comments */
|
||||
\%%[^\n]* /* skip comments */
|
||||
\%\%\*((.|\n)*)\*\%\% /* multiline skip comments */
|
||||
"participant" { this.begin('ID'); return 'participant'; }
|
||||
<ID>[^\->:\n,;]+?(?=((?!\n)\s)+"as"(?!\n)\s|[#\n;]|$) { yytext = yytext.trim(); this.begin('ALIAS'); return 'ACTOR'; }
|
||||
<ALIAS>"as" { this.popState(); this.popState(); this.begin('LINE'); return 'AS'; }
|
||||
|
@ -33,11 +33,10 @@
|
||||
%%
|
||||
|
||||
[\n]+ return 'NL';
|
||||
\s+ /* skip all whitespace */
|
||||
\s+ /* skip all whitespace */
|
||||
<ID,STATE,struct,LINE>((?!\n)\s)+ /* skip same-line whitespace */
|
||||
<INITIAL,ID,STATE,struct,LINE>\#[^\n]* /* skip comments */
|
||||
\%%[^\n]* /* skip comments */
|
||||
\%\%\*((.|\n)*)\*\%\% /* multiline skip comments */
|
||||
\%%[^\n]* /* skip comments */
|
||||
|
||||
"scale"\s+ { this.pushState('SCALE'); /* console.log('Got scale', yytext);*/ return 'scale'; }
|
||||
<SCALE>\d+ return 'WIDTH';
|
||||
|
Loading…
x
Reference in New Issue
Block a user