From f4fca87dbd44b2a14e30a60ee49ab558dba82f96 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 8 Apr 2016 19:44:14 +0200 Subject: allow spaces in line / platform filters --- index.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'index.pl') diff --git a/index.pl b/index.pl index 232a81c..3903dbe 100644 --- a/index.pl +++ b/index.pl @@ -260,11 +260,11 @@ sub get_filtered_departures { my $results = $data->{results}; if ( $opt{filter_line} ) { - my @lines = split( qr{,}, $opt{filter_line} ); + my @lines = split( qr{,[[:space:]]*}, $opt{filter_line} ); @grep_line = map { qr{ ^ \Q$_\E }ix } @lines; } if ( $opt{filter_platform} ) { - @grep_platform = split( qr{,}, $opt{filter_platform} ); + @grep_platform = split( qr{,[[:space:]]*}, $opt{filter_platform} ); } for my $d ( @{$results} ) { -- cgit v1.2.3