diff --git a/packages/mermaid/src/diagrams/flowchart/parser/flow.jison b/packages/mermaid/src/diagrams/flowchart/parser/flow.jison index e8f0775b8..49a56e82b 100644 --- a/packages/mermaid/src/diagrams/flowchart/parser/flow.jison +++ b/packages/mermaid/src/diagrams/flowchart/parser/flow.jison @@ -143,7 +143,7 @@ that id. <*>\s*\~\~[\~]+\s* return 'LINK'; [-/\)][\)] { this.popState(); return '-)'; } -[^/)]|-/!\)+ return "TEXT" +[^\(\)\[\]\{\}]|-/!\)+ return "TEXT" <*>"(-" { this.pushState("ellipseText"); return '(-'; } "])" { this.popState(); return 'STADIUMEND'; } @@ -164,7 +164,7 @@ that id. [\\(?=\])][\]] { this.popState(); return 'TRAPEND'; } \/(?=\])\] { this.popState(); return 'INVTRAPEND'; } -\/(?!\])|\\(?!\])|[^\\\]\/]+ return 'TEXT'; +\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+ return 'TEXT'; <*>"[/" { this.pushState("trapText"); return 'TRAPSTART'; } <*>"[\\" { this.pushState("trapText"); return 'INVTRAPSTART'; } @@ -251,7 +251,7 @@ that id. (\}) { this.popState(); return 'DIAMOND_STOP' } <*>"{" { this.pushState("text"); return 'DIAMOND_START' } -[^\]\)\}\|\"]+ return "TEXT"; +[^\[\]\(\)\{\}\|\"]+ return "TEXT"; "\"" return 'QUOTE'; (\r?\n)+ return 'NEWLINE';