Skip to content

Commit

Permalink
fix: Escape asterisks in commit subjects
Browse files Browse the repository at this point in the history
  • Loading branch information
dcodeIO committed Oct 25, 2020
1 parent 79dba49 commit 9cfff33
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ export function generateReleaseNotes(commits) {
function writeSection(category, title) {
sb.push(`### ${title}\n\n`);
for (let { subject, hash, body } of category) {
subject = subject.replace(/\*/g, "\\*");
sb.push(`* **${subject}** (${hash})\n`);
if (body.length) {
body = body.split(/\r?\n/g).join("\n ");
Expand Down

0 comments on commit 9cfff33

Please sign in to comment.