diff options
author | Daniel Friesel <derf@finalrewind.org> | 2015-10-11 14:38:44 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2015-10-11 14:38:44 +0200 |
commit | dfe612b078064a011afb51847d77fa68f234e479 (patch) | |
tree | 2bbd529954bba41a0e25eb04c3d96aa87b8c1843 | |
parent | 780b2215c63297aaf43c9c351cad8478c68205e4 (diff) |
shorten_line: handle HAFAS Tram prefixes
-rw-r--r-- | index.pl | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -92,7 +92,7 @@ sub get_results { my $status; if ( $backend eq 'hafas' ) { $status = Travel::Status::DE::HAFAS->new( - station => ( $city ? "${city} ${stop}" : $stop ), + station => ( $city ? "${city} ${stop}" : $stop ), excluded_mots => [qw[ice ic_ec d regio]], service => $sub_backend, ); @@ -184,10 +184,10 @@ sub handle_request { sub shorten_line { my ($line) = @_; - $line =~ s{ \s* S-Bahn }{}ox; + $line =~ s{ \s* S-Bahn }{}ix; - $line =~ s{ ^ ( U | S | SB ) \K \s+ }{}ox; - $line =~ s{ ^ ( STR | Bus | RNV ) }{}ox; + $line =~ s{ ^ ( U | S | SB ) \K \s+ }{}ix; + $line =~ s{ ^ ( STR | Bus | RNV | Tram ) }{}ix; $line =~ s{ ^ \s+ }{}ox; |