Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 柿碕町 patch #202

Merged
merged 2 commits into from
Jun 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/lib/dict.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const toRegexPattern = (string: string) => {
_str = _str
.replace(/三栄町|四谷三栄町/g, '(三栄町|四谷三栄町)')
.replace(/鬮野川|くじ野川|くじの川/g, '(鬮野川|くじ野川|くじの川)')
.replace(/柿碕町|柿さき町/g, '(柿碕町|柿さき町)')
.replace(/通り|とおり/g, '(通り|とおり)')
.replace(/埠頭|ふ頭/g, '(埠頭|ふ頭)')
.replace(/番町|番丁/g, '(番町|番丁)')
Expand Down
7 changes: 7 additions & 0 deletions test/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1094,5 +1094,12 @@ for (const [runtime, normalize] of cases) {
expect(res.town).toEqual('池麸町')
expect(res.level).toEqual(3)
})

test('柿碕町|柿さき町', async () => {
const address = '愛知県安城市柿碕町'
const res = await normalize(address)
expect(res.town).toEqual('柿さき町')
expect(res.level).toEqual(3)
})
})
}