Skip to content

Commit

Permalink
fixed regex in case of line break
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateodioev committed Jun 8, 2023
1 parent c7b678a commit 3a59b4a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Commands/CallbackCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ abstract class CallbackCommand extends Command
*/
protected function buildRegex(): string
{
$format = '#^(%s)(?: .+)?$#';
$format = '#^(%s)(?: [\s\S]+)?$#';
$alias = [$this->getName(), ...$this->getAliases()];

return sprintf(
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/MessageCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function setCaseSensitive(bool $caseSensitive = false): static
*/
protected function buildRegex(): string
{
$format = '#^(%s)(%s)(?: .*)?$#' . ($this->caseSensitive ? '' : 'i');
$format = '#^(%s)(%s)(?: [\s\S]*)?$#' . ($this->caseSensitive ? '' : 'i');
$alias = [$this->getName(), ...$this->getAliases()];

return sprintf(
Expand Down

0 comments on commit 3a59b4a

Please sign in to comment.