Skip to content

Commit a5c7f77

Browse files
committed
tasks(changelog): Add more newlines to the changelog for better readability
1 parent d42457c commit a5c7f77

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tasks/changelog.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,18 @@ module.exports = function(grunt) {
1818
const commitLog = execSync(getCommitLog).toString();
1919
const changes = commitLog.replace(/^\+ Merge.*[\r\n]*/gm, ''); // Filter out merge commits
2020
const date = new Date().toISOString().slice(0, 10);
21-
const versionHeader = '## ' + nextVersion + ' (' + date + ')\n';
21+
const versionHeader = `## ${nextVersion} (${date})\n`;
2222

2323
var changelog = fs.readFileSync('CHANGELOG.md', 'utf8');
24+
2425
if (changelog.indexOf(versionHeader, 13) >= 0) {
2526
grunt.log.warn('Changelog already updated.');
2627
return;
2728
}
29+
2830
changelog = '# CHANGELOG\n\n' +
29-
versionHeader + changes + '\n' +
31+
versionHeader + '\n' +
32+
changes + '\n\n' +
3033
changelog.replace(/^# CHANGELOG\s+/, '\n');
3134

3235
fs.writeFileSync('CHANGELOG.md', changelog);

0 commit comments

Comments
 (0)