diff --git a/src/diagrams/state/parser/stateDiagram.jison b/src/diagrams/state/parser/stateDiagram.jison index 31bdd83ee..b3c47adda 100644 --- a/src/diagrams/state/parser/stateDiagram.jison +++ b/src/diagrams/state/parser/stateDiagram.jison @@ -20,6 +20,7 @@ %x STATE_ID %x ALIAS %x SCALE +%x title %x accDescription %x NOTE %x NOTE_ID @@ -59,6 +60,8 @@ \d+ return 'WIDTH'; \s+"width" {this.popState();} +title { this.begin("title");return 'title'; } +(?!\n|;|#)*[^\n]* { this.popState(); return "title_value"; } accDescription { this.begin("accDescription");return 'accDescription'; } <accDescription>(?!\n|;|#)*[^\n]* { this.popState(); return "description_value"; } @@ -197,6 +200,7 @@ statement | note NOTE_TEXT AS ID | directive | direction + | title title_value { $$=$2.trim();yy.setTitle($$); } | accDescription description_value { $$=$2.trim();yy.setAccDescription($$); } ;