From: Philipp Spitzer Date: Fri, 15 Jul 2022 16:18:50 +0000 (+0200) Subject: Avoid having the public transport line label printed twice next to each other. X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/wrpylib.git/commitdiff_plain/a236ad62b276f3fc7c987a8a0c06cfd0e1567801 Avoid having the public transport line label printed twice next to each other. --- 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 %}