Skip to content

Commit cc65d20

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 9ea7e70 commit cc65d20

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
@@ -55,8 +55,11 @@ function replace (list, key, keyValue, value) {
5555
}
5656

5757
function save () {
58-
const str = ['---', yaml.dump(store), '---'].join('\n')
59-
fs.writeFileSync(p, str)
58+
fs.writeFileSync(p, [
59+
'---',
60+
yaml.safeDump(store, { lineWidth: Infinity }),
61+
'---'
62+
].join('\n'))
6063
}
6164

6265
exports.removeEmpty = removeEmpty

0 commit comments

Comments
 (0)