From 9e79c04de5eff6a0946afb4af01e84333891414c Mon Sep 17 00:00:00 2001 From: Sergei Zharinov Date: Tue, 20 Jul 2021 16:05:19 +0300 Subject: [PATCH] fix(github): Massage inner GitHub links more aggressively --- lib/platform/github/index.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/platform/github/index.ts b/lib/platform/github/index.ts index 869c13744e36a6..f968fa098ad976 100644 --- a/lib/platform/github/index.ts +++ b/lib/platform/github/index.ts @@ -1662,9 +1662,7 @@ export function massageMarkdown(input: string): string { } const massagedInput = input // to be safe, replace all github.com links with renovatebot redirector - .replace(/href="https?:\/\/github.com\//g, 'href="https://togithub.com/') - .replace(/]\(https:\/\/github\.com\//g, '](https://togithub.com/') - .replace(/]: https:\/\/github\.com\//g, ']: https://togithub.com/'); + .replace(/https?:\/\/(?:www)?github.com\//g, 'https://togithub.com/'); return smartTruncate(massagedInput, 60000); }