summaryrefslogtreecommitdiff
path: root/index.pl
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2015-10-11 14:38:44 +0200
committerDaniel Friesel <derf@finalrewind.org>2015-10-11 14:38:44 +0200
commitdfe612b078064a011afb51847d77fa68f234e479 (patch)
tree2bbd529954bba41a0e25eb04c3d96aa87b8c1843 /index.pl
parent780b2215c63297aaf43c9c351cad8478c68205e4 (diff)
shorten_line: handle HAFAS Tram prefixes
Diffstat (limited to 'index.pl')
-rw-r--r--index.pl8
1 files changed, 4 insertions, 4 deletions
diff --git a/index.pl b/index.pl
index 81217b0..c574328 100644
--- a/index.pl
+++ b/index.pl
@@ -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;