diff --git a/src/diagrams/class/parser/classDiagram.jison b/src/diagrams/class/parser/classDiagram.jison index f3da76a6d4..12e9a25649 100644 --- a/src/diagrams/class/parser/classDiagram.jison +++ b/src/diagrams/class/parser/classDiagram.jison @@ -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'; diff --git a/src/diagrams/flowchart/parser/flow.jison b/src/diagrams/flowchart/parser/flow.jison index f5e1848000..f867e5713d 100644 --- a/src/diagrams/flowchart/parser/flow.jison +++ b/src/diagrams/flowchart/parser/flow.jison @@ -10,8 +10,7 @@ %x dir %x vertex %% -\%\%[^\n]*\n* /* skip comments */ -\%\%\*((.|\n)*)\*\%\% /* multiline skip comments */ +\%\%[^\n]*\n* /* do nothing */ ["] this.begin("string"); ["] this.popState(); [^"]* return "STR"; diff --git a/src/diagrams/gantt/parser/gantt.jison b/src/diagrams/gantt/parser/gantt.jison index 24c6bf00f8..ea76b59a19 100644 --- a/src/diagrams/gantt/parser/gantt.jison +++ b/src/diagrams/gantt/parser/gantt.jison @@ -17,7 +17,6 @@ \s+ /* skip whitespace */ \#[^\n]* /* skip comments */ \%%[^\n]* /* skip comments */ -\%\%\*((.|\n)*)\*\%\% /* multiline skip comments */ /* ---interactivity command--- diff --git a/src/diagrams/git/parser/gitGraph.jison b/src/diagrams/git/parser/gitGraph.jison index 3958f4e575..e675a56e45 100644 --- a/src/diagrams/git/parser/gitGraph.jison +++ b/src/diagrams/git/parser/gitGraph.jison @@ -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'; diff --git a/src/diagrams/pie/parser/pie.jison b/src/diagrams/pie/parser/pie.jison index 96a555fbcb..2cc4045ff5 100644 --- a/src/diagrams/pie/parser/pie.jison +++ b/src/diagrams/pie/parser/pie.jison @@ -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' ; diff --git a/src/diagrams/sequence/parser/sequenceDiagram.jison b/src/diagrams/sequence/parser/sequenceDiagram.jison index 497a45bb6d..520978c052 100644 --- a/src/diagrams/sequence/parser/sequenceDiagram.jison +++ b/src/diagrams/sequence/parser/sequenceDiagram.jison @@ -26,7 +26,6 @@ ((?!\n)\s)+ /* skip same-line whitespace */ \#[^\n]* /* skip comments */ \%%[^\n]* /* skip comments */ -\%\%\*((.|\n)*)\*\%\% /* multiline skip comments */ "participant" { this.begin('ID'); return 'participant'; } [^\->:\n,;]+?(?=((?!\n)\s)+"as"(?!\n)\s|[#\n;]|$) { yytext = yytext.trim(); this.begin('ALIAS'); return 'ACTOR'; } "as" { this.popState(); this.popState(); this.begin('LINE'); return 'AS'; } diff --git a/src/diagrams/state/parser/stateDiagram.jison b/src/diagrams/state/parser/stateDiagram.jison index 0afb0f9fa4..49d1200c87 100644 --- a/src/diagrams/state/parser/stateDiagram.jison +++ b/src/diagrams/state/parser/stateDiagram.jison @@ -33,11 +33,10 @@ %% [\n]+ return 'NL'; -\s+ /* skip all whitespace */ +\s+ /* skip all whitespace */ ((?!\n)\s)+ /* skip same-line whitespace */ \#[^\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'; } \d+ return 'WIDTH';