|
548 | 548 | })()} |
549 | 549 | {@const releaseBody = (() => { |
550 | 550 | const body = release.body ?? ""; |
551 | | - if (releaseRepo?.repoName !== "language-tools") return body; |
| 551 | + if (!releaseRepo) return body; |
552 | 552 | // Add missing links to PRs in the release body |
553 | 553 | return body.replace( |
554 | | - /\(#(\d+)\)/g, // Match all `(#1234)` patterns |
555 | | - (_, prNumber) => { |
556 | | - const prUrl = `https://github.com/sveltejs/${releaseRepo.repoName}/pull/${prNumber}`; |
557 | | - return `([#${prNumber}](${prUrl}))`; |
| 554 | + /[^[][#\d, ]*?#(\d+)(#issuecomment-\d+)?[#\d, ]*?[^\]]/g, |
| 555 | + // Match all `(#1234)` patterns, including `#issuecomment-` ones and multiple in one parenthesis |
| 556 | + (match, prNumber, rest) => { |
| 557 | + if (!rest) rest = ""; |
| 558 | + const prUrl = `https://github.com/sveltejs/${releaseRepo.repoName}/pull/${prNumber}${rest}`; |
| 559 | + // replaceception |
| 560 | + return match.replace(`#${prNumber}${rest}`, `[#${prNumber}${rest}](${prUrl})`); |
558 | 561 | } |
559 | 562 | ); |
560 | 563 | })()} |
|
607 | 610 | </Tooltip.Content> |
608 | 611 | </Tooltip.Root> |
609 | 612 | {:else} |
610 | | - <span class="text-left text-lg group-hover:underline"> |
611 | | - {releaseName} |
| 613 | + <span class="flex flex-col text-left"> |
| 614 | + <span class="text-lg group-hover:underline">{releaseName}</span> |
| 615 | + {#if releaseRepo && id === "others"} |
| 616 | + <span class="text-sm text-muted-foreground"> |
| 617 | + {releaseRepo.repoName} |
| 618 | + </span> |
| 619 | + {/if} |
612 | 620 | </span> |
613 | 621 | {/if} |
614 | 622 | <div class="flex items-center gap-2 xs:hidden"> |
|
756 | 764 | <Button |
757 | 765 | href={release.html_url} |
758 | 766 | target="_blank" |
759 | | - class="group mb-4 ml-auto mr-8 font-semibold dark:text-black sm:ml-0 sm:mt-auto" |
| 767 | + class="group mb-4 ml-auto mr-8 font-semibold dark:text-black sm:ml-4 sm:mt-auto" |
760 | 768 | > |
761 | 769 | Open on <img src="/github.svg" alt="GitHub" class="ml-1.5 size-5" /> |
762 | 770 | <ArrowUpRight |
|
0 commit comments