1
0
Fork 0
mirror of https://github.com/perlbot/perlbuut synced 2025-06-07 16:35:40 -04:00

trim whitespace for arg plugin

This commit is contained in:
Ryan Voots 2020-10-02 15:51:16 -04:00
parent 1e5ef77011
commit 5fae083979

View file

@ -3,6 +3,9 @@ no warnings 'void';
sub { sub {
my( $said ) = @_; my( $said ) = @_;
# trim pure whitespace at beginning and end
$said->{macro_arg} =~ s/^\s*|\s*$//g;
my $flags = $said->{body}; my $flags = $said->{body};
my($quotemode, $wordnr, $auxfield) = ("z", 0, "macro_arg"); my($quotemode, $wordnr, $auxfield) = ("z", 0, "macro_arg");
$flags =~ s/\&(\w+)// and $flags =~ s/\&(\w+)// and