File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 547547 })()}
548548 {@const releaseBody = (() => {
549549 const body = release .body ?? " " ;
550- if (releaseRepo ?. repoName !== " language-tools " ) return body ;
550+ if (! releaseRepo ) return body ;
551551 // Add missing links to PRs in the release body
552552 return body .replace (
553- / \( #(\d + )\) / g , // Match all `(#1234)` patterns
554- (_ , prNumber ) => {
555- const prUrl = ` https://github.com/sveltejs/${releaseRepo .repoName }/pull/${prNumber } ` ;
556- return ` ([#${prNumber }](${prUrl })) ` ;
553+ / [^ [][#\d , ] *? #(\d + )(#issuecomment-\d + )? [#\d , ] *? [^ \] ] / g ,
554+ // Match all `(#1234)` patterns, including `#issuecomment-` ones and multiple in one parenthesis
555+ (match , prNumber , rest ) => {
556+ if (! rest ) rest = " " ;
557+ const prUrl = ` https://github.com/sveltejs/${releaseRepo .repoName }/pull/${prNumber }${rest } ` ;
558+ // replaceception
559+ return match .replace (` #${prNumber }${rest } ` , ` [#${prNumber }${rest }](${prUrl }) ` );
557560 }
558561 );
559562 })()}
You can’t perform that action at this time.
0 commit comments