When you indent with three spaces (our coding standard), you get a weird trailing EOL space on lines with array indicators.
For example, this script:
'use strict';
var fs = require('fs'),
path = require('path'),
yaml = require('js-yaml'),
data = { values: [ { a: 1 }, { b: 2 }, { c: 'three' } ] };
fs.writeFile(path.join(__dirname, 'sample.yml'), yaml.safeDump(data, { indent: 3 }), function(err) {
if (err) {
console.log('ERROR:', err, err.stack);
}
console.log('complete');
});
Results in this (note that I added $ at the end of each line so that the space is apparent).
values:$
- $
a: 1$
- $
b: 2$
- $
c: three$
Similar to #68
When you indent with three spaces (our coding standard), you get a weird trailing EOL space on lines with array indicators.
For example, this script:
Results in this (note that I added
$at the end of each line so that the space is apparent).Similar to #68