summaryrefslogtreecommitdiff
path: root/cgi
diff options
context:
space:
mode:
Diffstat (limited to 'cgi')
-rw-r--r--cgi/index.pl9
1 files changed, 9 insertions, 0 deletions
diff --git a/cgi/index.pl b/cgi/index.pl
index db519f6..7fafc4f 100644
--- a/cgi/index.pl
+++ b/cgi/index.pl
@@ -63,6 +63,14 @@ sub handle_request {
);
}
+sub shorten_line {
+ my ($line) = @_;
+
+ $line =~ s{ ^ SB \K \s+ }{}x;
+
+ return $line;
+}
+
sub shorten_destination {
my ( $dest, $city ) = @_;
@@ -174,6 +182,7 @@ sub render_image {
}
$destination = shorten_destination( $destination, $city );
+ $line = shorten_line($line);
$png->draw_at( 0, $line );
$png->draw_at( 25, $destination );