Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2020-11-04 01:20:45 +0300
committerisaacs <i@izs.me>2020-11-04 01:20:45 +0300
commite0302a02109d31ce099f1c2c92a6d4dd53abcce6 (patch)
tree61a30683b75cbe002189070dd7a29e948462b2f6 /scripts
parentfc76f3d9fcf19e65a9373ab3d9068c4326d2f782 (diff)
changelog: automatically backtickify scoped pkg names
Diffstat (limited to 'scripts')
-rw-r--r--scripts/changelog.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/changelog.js b/scripts/changelog.js
index c770b4ac4..0e84fc24f 100644
--- a/scripts/changelog.js
+++ b/scripts/changelog.js
@@ -53,8 +53,8 @@ function printCommit (c) {
.replace(/^/mg, ' ')
.replace(/\n$/, '')
// backtickify package@version
- .replace(/^(\s*[^@\s]+@\d+[.]\d+[.]\d+)(\s*\S)/g, '$1:$2')
- .replace(/\b([^@\s]+@\d+[.]\d+[.]\d+)\b/g, '`$1`')
+ .replace(/^(\s*@?[^@\s]+@\d+[.]\d+[.]\d+)(\s*\S)/g, '$1:$2')
+ .replace(/((?:\b|@)[^@\s]+@\d+[.]\d+[.]\d+)\b/g, '`$1`')
// linkify commitids
.replace(/\b([a-f0-9]{7,8})\b/g, '[`$1`](https://github.com/npm/cli/commit/$1)')
.replace(/\b#(\d+)\b/g, '[#$1](https://npm.community/t/$1)')