From: Mischa POSLAWSKY Date: Thu, 2 May 2019 00:59:52 +0000 (+0200) Subject: strip whitespace in member arrays of json output X-Git-Tag: v0.2~4 X-Git-Url: http://git.shiar.nl/sc2-widget/commitdiff_plain/eb6cb3960944b606e29f95c071450ee0cd3afe14 strip whitespace in member arrays of json output --- diff --git a/getsc2clan b/getsc2clan index 4f6bcc3..b23d2ac 100755 --- a/getsc2clan +++ b/getsc2clan @@ -62,4 +62,4 @@ say JSON->new->canonical->pretty->encode({ blizget(metadata => profile => 2 => 1 => $_->{id}) # lacks mmr, fav race (available in new api) } @members], -}); +}) =~ s/(?: \G \d,? | \[ ) \K \s+ (?=\d|\])/ /grx; # concat arrays of single digits