Skip to content

Commit

Permalink
fix: fix missing new line for commit line
Browse files Browse the repository at this point in the history
  • Loading branch information
qoomon committed Feb 28, 2023
1 parent 02576c3 commit 0071f55
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## **2.5.2** <sub><sup>2023-02-28 ([15ea67b...15ea67b](https://github.com/qoomon/git-conventional-commits/compare/15ea67b...15ea67b?diff=split))</sup></sub>

### Bug Fixes
* fix missing new line for commit line ([15ea67b](https://github.com/qoomon/git-conventional-commits/commit/15ea67b))


## **2.5.0** <sub><sup>2023-01-27 ([5d6f92f...5d6f92f](https://github.com/qoomon/git-conventional-commits/compare/5d6f92f...5d6f92f?diff=split))</sup></sub>

### Features
Expand Down
8 changes: 4 additions & 4 deletions lib/changelogGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,22 +135,22 @@ module.exports = function (config) {
function generateMarkdownCommit(commit) {
let commitMarkdown = '';
if (commit.revert) {
commitMarkdown += ` **Revert**`;
commitMarkdown += '**Revert** ';
}
let descriptionMarkdown = escapeMarkdown(commit.description);
// replace issue references with links
commit.description.match(config.issueRegex())?.forEach(issueId => {
descriptionMarkdown = descriptionMarkdown.replace(escapeMarkdown(issueId), markdownIssueId(issueId));
});
commitMarkdown += ` ${descriptionMarkdown}`;
commitMarkdown += descriptionMarkdown.trim();

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

function generateMarkdownBreakingChangesSection(commits) {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "git-conventional-commits",
"version": "2.5.1",
"version": "2.5.2",
"description": "git conventional commits util",
"licence": "GPLv3",
"main": "cli.js",
Expand Down

0 comments on commit 0071f55

Please sign in to comment.