mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-19 15:30:03 +02:00
Trim trailing spaces
This commit is contained in:
@@ -87,6 +87,7 @@ Tidal,Electricity grid,9.452
|
|||||||
UK land based bioenergy,Bio-conversion,182.01
|
UK land based bioenergy,Bio-conversion,182.01
|
||||||
Wave,Electricity grid,19.013
|
Wave,Electricity grid,19.013
|
||||||
Wind,Electricity grid,289.366
|
Wind,Electricity grid,289.366
|
||||||
|
|
||||||
</pre
|
</pre
|
||||||
>
|
>
|
||||||
|
|
||||||
|
@@ -64,5 +64,6 @@ Thermal generation,Losses,787.129
|
|||||||
Thermal generation,District heating,79.329
|
Thermal generation,District heating,79.329
|
||||||
Tidal,Electricity grid,9.452
|
Tidal,Electricity grid,9.452
|
||||||
UK land based bioenergy,Bio-conversion,182.01
|
UK land based bioenergy,Bio-conversion,182.01
|
||||||
|
|
||||||
Wave,Electricity grid,19.013
|
Wave,Electricity grid,19.013
|
||||||
Wind,Electricity grid,289.366
|
Wind,Electricity grid,289.366
|
|
@@ -1,5 +1,5 @@
|
|||||||
import diagram from './sankey.jison';
|
import diagram from './sankey-arrow.jison';
|
||||||
import { parser } from './sankey.jison';
|
import { parser } from './sankey-arrow.jison';
|
||||||
import db from '../sankeyDB.js';
|
import db from '../sankeyDB.js';
|
||||||
// import { fail } from 'assert';
|
// import { fail } from 'assert';
|
||||||
|
|
||||||
|
@@ -62,9 +62,9 @@ opt_eof
|
|||||||
|
|
||||||
record
|
record
|
||||||
: field\[source] COMMA field\[target] COMMA field\[value] {
|
: field\[source] COMMA field\[target] COMMA field\[value] {
|
||||||
const source = yy.findOrCreateNode($source);
|
const source = yy.findOrCreateNode($source.trim());
|
||||||
const target = yy.findOrCreateNode($target);
|
const target = yy.findOrCreateNode($target.trim());
|
||||||
const value = parseFloat($value);
|
const value = parseFloat($value.trim());
|
||||||
$$ = yy.addLink(source,target,value);
|
$$ = yy.addLink(source,target,value);
|
||||||
} // parse only 3 fields, this is not part of standard
|
} // parse only 3 fields, this is not part of standard
|
||||||
| // allow empty record to handle empty lines, this is not part of csv standard either
|
| // allow empty record to handle empty lines, this is not part of csv standard either
|
||||||
|
Reference in New Issue
Block a user