git-conventional-commits
Advanced tools
Comparing version 2.6.3 to 2.6.4
@@ -70,3 +70,3 @@ module.exports = function (config) { | ||
`## **${releaseName || lastChangelogCommit.hash}**` + | ||
` <sub><sup>${yyyy_mm_dd(lastChangelogCommit.date)} (${changelogCommitRangeMarkdown})</sup></sub>\n`; | ||
` <sub><sup>${yyyy_mm_dd(lastChangelogCommit.date)} (${changelogCommitRangeMarkdown})</sup></sub>\n\n`; | ||
@@ -78,7 +78,6 @@ if (changesSectionCommits.length > 0 || breakingSectionCommits.length > 0) { | ||
commitTypes.forEach((commitType) => { | ||
changelogMarkdown += "\n" + | ||
generateMarkdownCommitTypeSection( | ||
commitType, | ||
groupedChangelog[commitType] | ||
); | ||
changelogMarkdown += generateMarkdownCommitTypeSection( | ||
commitType, | ||
groupedChangelog[commitType] | ||
); | ||
}); | ||
@@ -105,10 +104,6 @@ | ||
} else { | ||
changelogMarkdown += "\n" + | ||
"*no relevant changes*\n"; | ||
changelogMarkdown += "*no relevant changes*\n"; | ||
} | ||
changelogMarkdown += | ||
"\n" + | ||
"<br>\n" + | ||
"\n"; | ||
changelogMarkdown +="<br>\n\n"; | ||
@@ -120,3 +115,3 @@ return changelogMarkdown; | ||
const typeSectionHeadline = config.headlines[commitType !== 'undefined' ? commitType : '?'] || commitType; | ||
let typeSectionMarkdown = `### ${typeSectionHeadline}\n`; | ||
let typeSectionMarkdown = `### ${typeSectionHeadline}\n\n`; | ||
@@ -131,5 +126,2 @@ const scopedCommits = bucketAggregation(commits, commit => commit.scope); | ||
commitScopes.forEach(scope => { | ||
if (scope !== 'undefined') { | ||
typeSectionMarkdown += "\n"; | ||
} | ||
typeSectionMarkdown += generateMarkdownScopeSection(scope, scopedCommits[scope]); | ||
@@ -144,8 +136,8 @@ }); | ||
if (scope !== 'undefined') { | ||
scopeSectionMarkdown += ` ##### \`${scope}\`\n`; | ||
scopeSectionMarkdown += `#####  \`${scope}\`\n\n`; | ||
} | ||
commits.forEach(commit => { | ||
scopeSectionMarkdown += `* ${generateMarkdownCommit(commit)}`; | ||
scopeSectionMarkdown += `- ${generateMarkdownCommit(commit)}`; | ||
}); | ||
return scopeSectionMarkdown; | ||
return scopeSectionMarkdown + '\n' | ||
} | ||
@@ -186,3 +178,3 @@ | ||
let breakingChangeMarkdown = "* "; | ||
let breakingChangeMarkdown = "- "; | ||
if (commit.scope) { | ||
@@ -194,7 +186,7 @@ breakingChangeMarkdown += `\`${commit.scope}\``; | ||
} | ||
breakingChangeMarkdown += ` (${markdownCommitHash(commit.hash)})`; | ||
breakingChangeMarkdown += ` (${markdownCommitHash(commit.hash)})\n`; | ||
if (msgBody) { | ||
breakingChangeMarkdown += `<br>${escapeMarkdown(msgBody)}`; | ||
breakingChangeMarkdown += "\n"; | ||
breakingChangeMarkdown += `${escapeMarkdown(msgBody)}\n`; | ||
} | ||
breakingChangeMarkdown += "\n"; | ||
@@ -252,3 +244,3 @@ changelogMarkdown += breakingChangeMarkdown; | ||
const markdownEscapeRegex = RegExp("[" + markdownEscapeChars.join("\\") + "]", "g"); | ||
return text.replace(markdownEscapeRegex, "\\$&").replace(/\n/g, "<br>"); | ||
return text.replace(markdownEscapeRegex, "\\$&").replace(/\n/g, "\n "); | ||
} | ||
@@ -255,0 +247,0 @@ |
@@ -89,3 +89,3 @@ const fs = require("fs"); | ||
"breakingChange": "BREAKING CHANGES", | ||
"?": "???" | ||
"?": "? ? ?" | ||
}, | ||
@@ -92,0 +92,0 @@ commitUrl: null, |
{ | ||
"name": "git-conventional-commits", | ||
"version": "2.6.3", | ||
"version": "2.6.4", | ||
"description": "git conventional commits util", | ||
@@ -5,0 +5,0 @@ "licence": "GPLv3", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
75010
742