Skip to content

Commit

Permalink
fix(usa_state_abbr): bugfix for USA state abbreviation
Browse files Browse the repository at this point in the history
  • Loading branch information
missinglink committed Nov 16, 2020
1 parent ee5f98e commit daf965c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions resources/pelias/dictionaries/libpostal/de/place_names.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!ma
15 changes: 15 additions & 0 deletions test/address.usa.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,21 @@ const testcase = (test, common) => {
{ postcode: '21613' },
{ country: 'USA' }
]], false)

// 'Massachusetts' and 'MA' should be interchangeable and both
// forms should allow 'Boston' to be parsed as a locality.
assert('12 main st, boston massachusetts', [
{ housenumber: '12' },
{ street: 'main st' },
{ locality: 'boston' },
{ region: 'massachusetts' }
])
assert('12 main st, boston ma', [
{ housenumber: '12' },
{ street: 'main st' },
{ locality: 'boston' },
{ region: 'ma' }
])
}

module.exports.all = (tape, common) => {
Expand Down

0 comments on commit daf965c

Please sign in to comment.