Skip to content

Commit

Permalink
More forgiving flowcharts, space at the end of the line allowed
Browse files Browse the repository at this point in the history
  • Loading branch information
knsv committed Feb 25, 2015
1 parent 0955c4c commit 8598a7d
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 32 deletions.
13 changes: 7 additions & 6 deletions dist/mermaid.full.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/mermaid.full.min.js

Large diffs are not rendered by default.

13 changes: 7 additions & 6 deletions dist/mermaid.slim.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/mermaid.slim.min.js

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions src/diagrams/flowchart/parser/flow.jison
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
return 'ALPHA';
"|" return 'PIPE';
"(" return 'PS';
")" return 'PE';
")" return 'PE';
"[" return 'SQS';
"]" return 'SQE';
"{" return 'DIAMOND_START'
Expand Down Expand Up @@ -229,31 +229,31 @@ verticeStatement:

vertex: alphaNum SQS text SQE
{$$ = $1;yy.addVertex($1,$3,'square');}
| alphaNum SQS text SQE SPACE
| alphaNum SQS text SQE spaceList
{$$ = $1;yy.addVertex($1,$3,'square');}
| alphaNum PS PS text PE PE
{$$ = $1;yy.addVertex($1,$4,'circle');}
| alphaNum PS PS text PE PE SPACE
| alphaNum PS PS text PE PE spaceList
{$$ = $1;yy.addVertex($1,$4,'circle');}
| alphaNum PS text PE
{$$ = $1;yy.addVertex($1,$3,'round');}
| alphaNum PS text PE SPACE
| alphaNum PS text PE spaceList
{$$ = $1;yy.addVertex($1,$3,'round');}
| alphaNum DIAMOND_START text DIAMOND_STOP
{$$ = $1;yy.addVertex($1,$3,'diamond');}
| alphaNum DIAMOND_START text DIAMOND_STOP SPACE
| alphaNum DIAMOND_START text DIAMOND_STOP spaceList
{$$ = $1;yy.addVertex($1,$3,'diamond');}
| alphaNum TAGEND text SQE
{$$ = $1;yy.addVertex($1,$3,'odd');}
| alphaNum TAGEND text SQE SPACE
| alphaNum TAGEND text SQE spaceList
{$$ = $1;yy.addVertex($1,$3,'odd');}
/* | alphaNum SQS text TAGSTART
{$$ = $1;yy.addVertex($1,$3,'odd_right');}
| alphaNum SQS text TAGSTART SPACE
| alphaNum SQS text TAGSTART spaceList
{$$ = $1;yy.addVertex($1,$3,'odd_right');} */
| alphaNum
{$$ = $1;yy.addVertex($1);}
| alphaNum SPACE
| alphaNum spaceList
{$$ = $1;yy.addVertex($1);}
;

Expand Down
6 changes: 3 additions & 3 deletions src/diagrams/flowchart/parser/flow.js

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions src/diagrams/gantt/ganttRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,12 +316,13 @@ module.exports.draw = function (text, id) {

function drawToday(theSidePad, theTopPad, w, h) {
var todayG = svg.append('g')
.attr('class', 'today')
.attr('class', 'today');

var today = new Date();

var todayLine = todayG.append("line")
.attr("x1", timeScale(new Date('2014-01-13')) + theSidePad)
.attr("x2", timeScale(new Date('2014-01-13')) + theSidePad)
.attr("x1", timeScale(today) + theSidePad)
.attr("x2", timeScale(today) + theSidePad)
.attr("y1", conf.titleTopMargin)
.attr("y2", h-conf.titleTopMargin)
.attr('class', 'today')
Expand Down

0 comments on commit 8598a7d

Please sign in to comment.