From 2ce4cbeef6d8b90b78bbbcb45ca313d086d85174 Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Mon, 19 Feb 2024 10:42:49 +0100 Subject: [PATCH] fix: links --- index.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/index.php b/index.php index 20eb499..11025f1 100644 --- a/index.php +++ b/index.php @@ -111,8 +111,7 @@ '; $links = array(); - if (preg_match_all('/\[\[(.*)\]\]/', $content, $links, PREG_SET_ORDER) - || preg_match_all('/http(.*)[ \r]/', $content, $links, PREG_SET_ORDER)) + if (preg_match_all('/\[\[(.*)\]\]/', $content, $links, PREG_SET_ORDER)) { echo '
Internal links:
'; foreach($links as $link) @@ -124,13 +123,13 @@ echo '
'; } $links = array(); - if (preg_match_all('/http(.*)[ \r]/', $content, $links, PREG_SET_ORDER)) + if (preg_match_all('/https:(.*)[ \r]/', $content, $links, PREG_SET_ORDER)) { echo '
External links:
'; foreach($links as $link) { echo '
- http' . $link[1] . ' + https:' . $link[1] . '
'; } echo '
';