mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-25 10:20:06 +02:00
add title to jison
This commit is contained in:
@@ -20,6 +20,7 @@
|
|||||||
%x STATE_ID
|
%x STATE_ID
|
||||||
%x ALIAS
|
%x ALIAS
|
||||||
%x SCALE
|
%x SCALE
|
||||||
|
%x title
|
||||||
%x accDescription
|
%x accDescription
|
||||||
%x NOTE
|
%x NOTE
|
||||||
%x NOTE_ID
|
%x NOTE_ID
|
||||||
@@ -59,6 +60,8 @@
|
|||||||
<SCALE>\d+ return 'WIDTH';
|
<SCALE>\d+ return 'WIDTH';
|
||||||
<SCALE>\s+"width" {this.popState();}
|
<SCALE>\s+"width" {this.popState();}
|
||||||
|
|
||||||
|
title { this.begin("title");return 'title'; }
|
||||||
|
<title>(?!\n|;|#)*[^\n]* { this.popState(); return "title_value"; }
|
||||||
accDescription { this.begin("accDescription");return 'accDescription'; }
|
accDescription { this.begin("accDescription");return 'accDescription'; }
|
||||||
<accDescription>(?!\n|;|#)*[^\n]* { this.popState(); return "description_value"; }
|
<accDescription>(?!\n|;|#)*[^\n]* { this.popState(); return "description_value"; }
|
||||||
|
|
||||||
@@ -197,6 +200,7 @@ statement
|
|||||||
| note NOTE_TEXT AS ID
|
| note NOTE_TEXT AS ID
|
||||||
| directive
|
| directive
|
||||||
| direction
|
| direction
|
||||||
|
| title title_value { $$=$2.trim();yy.setTitle($$); }
|
||||||
| accDescription description_value { $$=$2.trim();yy.setAccDescription($$); }
|
| accDescription description_value { $$=$2.trim();yy.setAccDescription($$); }
|
||||||
;
|
;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user