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];