From 5fae0839795070a228dfa533f76f40176a173620 Mon Sep 17 00:00:00 2001 From: Ryan Voots Date: Fri, 2 Oct 2020 15:51:16 -0400 Subject: [PATCH] trim whitespace for arg plugin --- plugins/arg.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/arg.pm b/plugins/arg.pm index d7dbcd7..b43cd05 100644 --- a/plugins/arg.pm +++ b/plugins/arg.pm @@ -3,6 +3,9 @@ no warnings 'void'; sub { my( $said ) = @_; + # trim pure whitespace at beginning and end + $said->{macro_arg} =~ s/^\s*|\s*$//g; + my $flags = $said->{body}; my($quotemode, $wordnr, $auxfield) = ("z", 0, "macro_arg"); $flags =~ s/\&(\w+)// and