From 420784efa2cb3c24a6a51cc2ab81b16fee3c14e6 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Wed, 5 Jun 2024 11:50:10 +1200 Subject: [PATCH] FIX Do not hyperlink website repos --- app/src/DataFetcher/Utils/OutputUtil.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/DataFetcher/Utils/OutputUtil.php b/app/src/DataFetcher/Utils/OutputUtil.php index f28f2a9..ca52929 100644 --- a/app/src/DataFetcher/Utils/OutputUtil.php +++ b/app/src/DataFetcher/Utils/OutputUtil.php @@ -63,6 +63,10 @@ public static function outputHtmlTable(string $filename, array $data, string $sc preg_match_all($rx, $html, $m); foreach ($m[0] as $url) { $href = trim($url, '><'); + // don't hyperlink repos such as doc.silverstripe.org + if (preg_match('#^[a-z]+\.silverstripe\.org$#', $href)) { + continue; + } $extraText = ''; // hack for MergeUpsProcessor if (strpos($href, ':needs-merge-up') !== false) {