summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2016-04-08 19:44:14 +0200
committerDaniel Friesel <derf@finalrewind.org>2016-04-08 19:44:14 +0200
commitf4fca87dbd44b2a14e30a60ee49ab558dba82f96 (patch)
treef3b7c9154a5212824c2dcdcb006ad87726240596
parent8695b61e3787009df59d7fc9a013bb4a1522d630 (diff)
allow spaces in line / platform filters
-rw-r--r--index.pl4
1 files changed, 2 insertions, 2 deletions
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} ) {