mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +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:
|
||||
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
|
||||
names: !include country-names/mz.yaml
|
||||
postcode:
|
||||
pattern: "(dddd)-?(dd)?"
|
||||
output: \1-\2
|
||||
pattern: "(dddd)(?:-dd)?"
|
||||
|
||||
|
||||
# Namibia (Namibia)
|
||||
|
||||
Reference in New Issue
Block a user