From 96dfab6a7fec08e2c83bbc0bd22b330985692784 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Wed, 17 Dec 2025 18:32:55 +0100 Subject: View: Normalize trip type / line number to avoid redundancy Closes #343 --- templates/_format_train.html.ep | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'templates/_format_train.html.ep') diff --git a/templates/_format_train.html.ep b/templates/_format_train.html.ep index cb81211..f06e905 100644 --- a/templates/_format_train.html.ep +++ b/templates/_format_train.html.ep @@ -1,10 +1,13 @@ % if ($journey->{extra_data}{wagonorder_pride}) { 🏳️‍🌈 % } - + % if (not $journey->{is_motis}) { <%= $journey->{train_type} %> % } + % if ($journey->{train_type} and $journey->{train_line}) { + % $journey->{train_line} =~ s{ ^ \Q$journey->{train_type}\E (?= \d ) }{}x; + % } <%= $journey->{train_line} // $journey->{train_no}%> % if ($journey->{train_line}) { -- cgit v1.2.3