diff --git a/lib/PBot/Core/Interpreter.pm b/lib/PBot/Core/Interpreter.pm index 916396aa..29e8ae3d 100644 --- a/lib/PBot/Core/Interpreter.pm +++ b/lib/PBot/Core/Interpreter.pm @@ -699,7 +699,7 @@ sub handle_result($self, $context, $result = $context->{result}) { $context->{original_result} = $result; $result =~ s/[\n\r]/ /g unless $preserve_newlines; - $result =~ s/[ \t]+/ /g unless $context->{preserve_whitespace}; + #$result =~ s/[ \t]+/ /g unless $context->{preserve_whitespace}; my $max_lines = $self->{pbot}->{registry}->get_value($context->{from}, 'max_newlines') // 4; my $lines = 0; @@ -1320,6 +1320,9 @@ sub make_args($self, $string, %opts) { # add argument with quotes and spaces preserved push @arglist_unstripped, $arg; + # strip leading spaces from argument + $arg =~ s/^\s+//; + # strip quotes from argument if ($arg =~ m/^'.*'$/) { $arg =~ s/^'//; @@ -1329,9 +1332,6 @@ sub make_args($self, $string, %opts) { $arg =~ s/"$//; } - # strip leading spaces from argument - $arg =~ s/^\s+//; - # add stripped argument push @arglist, $arg; } diff --git a/lib/PBot/Plugin/FuncSed.pm b/lib/PBot/Plugin/FuncSed.pm index f03dd3b4..82a28ce1 100644 --- a/lib/PBot/Plugin/FuncSed.pm +++ b/lib/PBot/Plugin/FuncSed.pm @@ -31,7 +31,7 @@ sub func_sed($self, @rest) { my $text = "@rest"; my $result = eval { - if ($text =~ /^s(.)(.*?)(? "PBot", - BUILD_REVISION => 4821, + BUILD_REVISION => 4822, BUILD_DATE => "2024-11-02", };