From 46c222bc74afbd3946a5659241f3c0f6edaa25e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Thu, 17 Jul 2025 19:42:32 +0200 Subject: [PATCH] railway-electrification: improve code layout --- railway-electrification.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/railway-electrification.yaml b/railway-electrification.yaml index f5fd703..3d70aac 100644 --- a/railway-electrification.yaml +++ b/railway-electrification.yaml @@ -52,8 +52,10 @@ feature: {% set width=2 %} {% endif %} {% endif %} - title: '{% if tags.ref %}{{ localizedTag(tags, ''ref'') }} - {% endif %}{{ localizedTag(tags, ''name'')|default(localizedTag(tags, ''operator'')) }}' - description: '{{ tagTrans(''railway'', tags.railway) }}' + title: |- + {% if tags.ref %}{{ localizedTag(tags, "ref") }} - {% endif %}{{ localizedTag(tags, "name")|default(localizedTag(tags, "operator")) }} + description: |- + {{ tagTrans("railway", tags.railway) }} details: |- {% if tags.electrified == 'no' %} {{ tagTrans('electrified', 'no') }} @@ -70,7 +72,11 @@ feature: markerSymbol: null listMarkerSymbol: line styles: casing,default - priority: '{% if tags.railway == ''station'' %}0{% elseif tags.railway in [ ''halt'', ''tram_stop'' ] %}1{% else %}5{% endif %}' + priority: |- + {% if tags.railway == "station" %}0 + {% elseif tags.railway in [ "halt", "tram_stop" ] %}1 + {% else %}5 + {% endif %} style: width: '{{ width }}' lineCap: butt