From a236ad62b276f3fc7c987a8a0c06cfd0e1567801 Mon Sep 17 00:00:00 2001 From: Philipp Spitzer Date: Fri, 15 Jul 2022 18:18:50 +0200 Subject: [PATCH] Avoid having the public transport line label printed twice next to each other. --- wrpylib/templates/sledrun_wikitext.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wrpylib/templates/sledrun_wikitext.txt b/wrpylib/templates/sledrun_wikitext.txt index 6d7216e..895c1ef 100644 --- a/wrpylib/templates/sledrun_wikitext.txt +++ b/wrpylib/templates/sledrun_wikitext.txt @@ -136,8 +136,10 @@ Leider ist keine Anreise mit öffentlichen Verkehrsmitteln möglich. * '''Fahrplan''': {% for pt_line in public_transport_lines -%} ** {% set space = joiner(" ") %} - {%- if pt_line.name %}{{ space() }}{{ pt_line.name }}{% endif %} + {%- if pt_line.name %}{{ space() }}{{ pt_line.name }} + {%- else %} {%- if pt_line.label %}{{ space() }}{{ pt_line.label }}{% endif %} + {%- endif %} {%- if pt_line.timetable_template %}{{ space() }}{{ h.json_template(pt_line.timetable_template) }}{% endif %} {%- if pt_line.route %}{{ space() }}{{ pt_line.route }}{% endif %} {%- if pt_line.note %}{{ space() }}{{ pt_line.note }}{% endif %} -- 2.39.5