Skip to content

Commit 0071f55

Browse files
committed
fix: fix missing new line for commit line
1 parent 02576c3 commit 0071f55

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## **2.5.2** <sub><sup>2023-02-28 ([15ea67b...15ea67b](https://github.com/qoomon/git-conventional-commits/compare/15ea67b...15ea67b?diff=split))</sup></sub>
2+
3+
### Bug Fixes
4+
* fix missing new line for commit line ([15ea67b](https://github.com/qoomon/git-conventional-commits/commit/15ea67b))
5+
6+
17
## **2.5.0** <sub><sup>2023-01-27 ([5d6f92f...5d6f92f](https://github.com/qoomon/git-conventional-commits/compare/5d6f92f...5d6f92f?diff=split))</sup></sub>
28

39
### Features

lib/changelogGenerator.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,22 +135,22 @@ module.exports = function (config) {
135135
function generateMarkdownCommit(commit) {
136136
let commitMarkdown = '';
137137
if (commit.revert) {
138-
commitMarkdown += ` **Revert**`;
138+
commitMarkdown += '**Revert** ';
139139
}
140140
let descriptionMarkdown = escapeMarkdown(commit.description);
141141
// replace issue references with links
142142
commit.description.match(config.issueRegex())?.forEach(issueId => {
143143
descriptionMarkdown = descriptionMarkdown.replace(escapeMarkdown(issueId), markdownIssueId(issueId));
144144
});
145-
commitMarkdown += ` ${descriptionMarkdown}`;
145+
commitMarkdown += descriptionMarkdown.trim();
146146

147147
let referencesMarkdown = [markdownCommitHash(commit.hash)];
148148
// add issue references from body
149149
commit.body.match(config.issueRegex())?.forEach(issueId => {
150150
referencesMarkdown.push(markdownIssueId(issueId));
151151
});
152-
commitMarkdown += ` (${referencesMarkdown.join(', ')})\n`;
153-
return commitMarkdown.trim();
152+
commitMarkdown += ` (${referencesMarkdown.join(', ')})`;
153+
return commitMarkdown + "\n";
154154
}
155155

156156
function generateMarkdownBreakingChangesSection(commits) {

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "git-conventional-commits",
3-
"version": "2.5.1",
3+
"version": "2.5.2",
44
"description": "git conventional commits util",
55
"licence": "GPLv3",
66
"main": "cli.js",

0 commit comments

Comments
 (0)