Skip to content

Commit 52f4895

Browse files
committed
Prevent spurious new lines from being added in the event descriptions
This works around a js-yaml issue where spurious new lines are incorrectly added when serializing an object. See nodeca/js-yaml#222.
1 parent b182af6 commit 52f4895

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

events/yaml-sync.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,11 @@ function replace (list, key, keyValue, value) {
4545
}
4646

4747
function save () {
48-
const str = ['---', yaml.dump(store), '---'].join('\n')
49-
fs.writeFileSync(p, str)
48+
fs.writeFileSync(p, [
49+
'---',
50+
yaml.safeDump(store, { lineWidth: Infinity }),
51+
'---'
52+
].join('\n'))
5053
}
5154

5255
exports.removeEmpty = removeEmpty

0 commit comments

Comments
 (0)