Skip to content

Commit 7eeacdb

Browse files
committed
gen-changelog: fix npm.community url parsing
1 parent d4242d4 commit 7eeacdb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/changelog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ main()
1919

2020
function shortname (url) {
2121
let matched = url.match(/https:\/\/github\.com\/([^/]+\/[^/]+)\/(?:pull|issues)\/(\d+)/) ||
22-
url.match(/https:\/\/(npm\.community)\/t\/(\d+)/)
22+
url.match(/https:\/\/(npm\.community)\/t\/(?:[^/]+\/)(\d+)/)
2323
if (!matched) return false
2424
let repo = matched[1]
2525
let id = matched[2]

0 commit comments

Comments
 (0)