diff --git a/commit-to-output.js b/commit-to-output.js index 3e25376..9be9fd3 100644 --- a/commit-to-output.js +++ b/commit-to-output.js @@ -76,10 +76,10 @@ function toStringMarkdown (data) { s += `* \\[[\`${data.sha.substr(0, 10)}\`](${data.shaUrl})] - ` s += (data.semver || []).length ? `**(${data.semver.join(', ').toUpperCase()})** ` : '' s += data.revert ? '***Revert*** "' : '' - s += data.group ? `**${data.group}**: ` : '' + s += data.group ? `**${cleanMarkdown(data.group)}**: ` : '' s += cleanMarkdown(data.summary) s += data.revert ? '" ' : ' ' - s += data.author ? `(${data.author}) ` : '' + s += data.author ? `(${cleanMarkdown(data.author)}) ` : '' s += data.pr ? `[${data.pr}](${data.prUrl})` : '' s = s.trim() diff --git a/test.js b/test.js index 97a12c3..fbe504c 100644 --- a/test.js +++ b/test.js @@ -115,3 +115,11 @@ test('test backtick strings in commit messages', (t) => { `) t.end() }) + +test('test markdown punctuation chars in commit message and author name', (t) => { + t.equal( + exec('--start-ref=eadf9e3d32--end-ref=eadf9e3d32--filter-release --commit-url=https://yeehaw.com/{ref}/{ref}/{ghUser}/{ghRepo}/'), + `* \\[[\`eadf9e3d32\`](https://yeehaw.com/eadf9e3d32/eadf9e3d32/nodejs/changelog-maker/)] - **group\\_with\\_underscore**: test commit message (Author\\_name\\_with\\_underscore) +`) + t.end() +})