diff options
author | isaacs <i@izs.me> | 2020-11-04 01:20:45 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2020-11-04 01:20:45 +0300 |
commit | e0302a02109d31ce099f1c2c92a6d4dd53abcce6 (patch) | |
tree | 61a30683b75cbe002189070dd7a29e948462b2f6 /scripts | |
parent | fc76f3d9fcf19e65a9373ab3d9068c4326d2f782 (diff) |
changelog: automatically backtickify scoped pkg names
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/changelog.js | 4 |
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)') |