From 6cda2e7429247fd651fb913f6ff50393f9564fd1 Mon Sep 17 00:00:00 2001 From: Angelos Bouklis <53124886+ArjixWasTaken@users.noreply.github.com> Date: Wed, 21 Jun 2023 12:31:46 +0300 Subject: [PATCH] Update ChatGPT.php --- library/ChatGPT.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ChatGPT.php b/library/ChatGPT.php index 1d041db..754ff92 100644 --- a/library/ChatGPT.php +++ b/library/ChatGPT.php @@ -239,7 +239,7 @@ protected function parse_function( callable $function ) { ]; $matches = []; - preg_match_all( '/@param\s+(\S+)\s+\$(\S+)[^\S\r\n]?([^\r\n]+)?/', $doc_comment, $matches ); + preg_match_all('/@param *(\w+) *\$(\w+) ?(.*?)$/gsm', $doc_comment, $matches); $types = $matches[1]; $names = $matches[2];