From 6eee6896852989352e77fc259ffbe79240888ea7 Mon Sep 17 00:00:00 2001 From: Al Date: Tue, 27 Dec 2016 03:16:04 -0500 Subject: [PATCH] [fix] only applying separator tag to commas --- scripts/geodata/address_formatting/formatter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/geodata/address_formatting/formatter.py b/scripts/geodata/address_formatting/formatter.py index 860a5954..30a59725 100644 --- a/scripts/geodata/address_formatting/formatter.py +++ b/scripts/geodata/address_formatting/formatter.py @@ -806,7 +806,7 @@ class AddressFormatter(object): return self.get_template_from_config(self.templates_place_only, country, language=language) def tagged_tokens(self, name, label): - return six.u(' ').join([six.u('{}/{}').format(t.replace(' ', ''), label if t not in (',', '-') else self.separator_tag) for t, c in tokenize(name)]) + return six.u(' ').join([six.u('{}/{}').format(t.replace(' ', ''), label if t != ',' else self.separator_tag) for t, c in tokenize(name)]) def template_language_matters(self, country, language): return '{}_{}'.format(country.upper(), language) in self.country_formats or '{}_{}'.format(country, language) in self.country_formats