From aba940bc6e97f844d4cb17f5abac210c2f1cb83e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Fri, 26 Oct 2018 08:13:24 +0200 Subject: [PATCH] car_routes: improve refs - natsort refs - remove duplicate refs - split&trim refs from way --- car_routes.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/car_routes.json b/car_routes.json index f30b89eb..fb623aae 100644 --- a/car_routes.json +++ b/car_routes.json @@ -22,7 +22,9 @@ "{% set refs = [] %}", "{% set color = '#d41d8c' %}", "{% if tags.ref %}", - " {% set refs = refs|merge([ tags.ref ]) %}", + " {% for ref in tags.ref|split(';') %}", + " {% set refs = refs|merge([ ref|trim ]) %}", + " {% endfor %}", "{% endif %}", "", "{% for master in masters %}", @@ -32,7 +34,9 @@ " {% if master.tags.ref %}", " {% set refs = refs|merge([ master.tags.ref ]) %}", " {% endif %}", - "{% endfor %}" + "{% endfor %}", + "", + "{% set refs = refs|unique|natsort({ insensitive: true }) %}" ], "body": [ "

Routes

",