mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-13 22:34:07 +00:00
fix postcode pattern for Mozambique
Optional groups are not implemented yet.
This commit is contained in:
@@ -57,7 +57,8 @@ class _PostcodeSanitizer:
|
|||||||
if match is None:
|
if match is None:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
return self.matcher.normalize(country, match), ' '.join(match.groups())
|
return self.matcher.normalize(country, match),\
|
||||||
|
' '.join(filter(lambda p: p is not None, match.groups()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1386,8 +1386,7 @@ mz:
|
|||||||
languages: pt
|
languages: pt
|
||||||
names: !include country-names/mz.yaml
|
names: !include country-names/mz.yaml
|
||||||
postcode:
|
postcode:
|
||||||
pattern: "(dddd)-?(dd)?"
|
pattern: "(dddd)(?:-dd)?"
|
||||||
output: \1-\2
|
|
||||||
|
|
||||||
|
|
||||||
# Namibia (Namibia)
|
# Namibia (Namibia)
|
||||||
|
|||||||
Reference in New Issue
Block a user