From 79fd257589d7b9c968657aa40b2e78631c5fb2e9 Mon Sep 17 00:00:00 2001 From: ghost Date: Fri, 2 Feb 2024 12:58:43 +0200 Subject: [PATCH] fix getH1 response --- src/Dokuwiki/Reader.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Dokuwiki/Reader.php b/src/Dokuwiki/Reader.php index 55dcf3d..ffd0a47 100644 --- a/src/Dokuwiki/Reader.php +++ b/src/Dokuwiki/Reader.php @@ -251,7 +251,7 @@ class Reader { foreach ((array) explode(PHP_EOL, $gemini) as $line) { - preg_match_all( + preg_match( $regex, $line, $matches @@ -266,6 +266,8 @@ class Reader break; } } + + return null; } public function getLinks(string $gemini, ?string $regex = '/(https?|gemini):\/\/\S+/'): array