We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0e1b780 commit 8d08071Copy full SHA for 8d08071
packages/decap-cms-core/src/backend.ts
@@ -1313,7 +1313,12 @@ export class Backend {
1313
const format = resolveFormat(collection, entry.toJS());
1314
const fieldsOrder = this.fieldsOrder(collection, entry);
1315
const fieldsComments = selectFieldsComments(collection, entry);
1316
- return format && format.toFile(entry.get('data').toJS(), fieldsOrder, fieldsComments);
+ let content = format.toFile(entry.get('data').toJS(), fieldsOrder, fieldsComments);
1317
+ if (content.slice(-1) != '\n') {
1318
+ // add the EOL if it does not exist.
1319
+ content += '\n';
1320
+ }
1321
+ return content;
1322
}
1323
1324
fieldsOrder(collection: Collection, entry: EntryMap) {
0 commit comments