From 9cfff338777209a8a2e06cde636cfee30a67e6a1 Mon Sep 17 00:00:00 2001 From: dcode Date: Sun, 25 Oct 2020 17:53:43 +0100 Subject: [PATCH] fix: Escape asterisks in commit subjects --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index 00a6e2d..edc8c8d 100644 --- a/index.js +++ b/index.js @@ -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 ");