Skip to content

Commit

Permalink
fix(api): strip state out of zone
Browse files Browse the repository at this point in the history
refs #371
  • Loading branch information
steveoh committed Aug 12, 2024
1 parent bd6d6e8 commit ac4faf1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/api/Cache/RegexCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ public RegexCache(IAbbreviations abbreviations) {
"cityTownCruft", cityTownCruft()
}, {
"stripCitySuffix", stripCitySuffix()
}, {
"stripStateSuffix", stripStateSuffix()
}, {
"avesOrdinal", BuildOrdinalRegex()
}
Expand Down Expand Up @@ -142,6 +144,8 @@ private static string ToOrdinal(int number) {
private static partial Regex cityName();
[GeneratedRegex("(?:city|town)(?: of)", RegexOptions.IgnoreCase | RegexOptions.Compiled, "en-US")]
private static partial Regex cityTownCruft();
[GeneratedRegex("(?:cty|city)$", RegexOptions.IgnoreCase | RegexOptions.Compiled, "en-US")]
[GeneratedRegex("\\b(?:cty|city)$", RegexOptions.IgnoreCase | RegexOptions.Compiled, "en-US")]
private static partial Regex stripCitySuffix();
[GeneratedRegex("\\b(?:utah|ut)$", RegexOptions.IgnoreCase | RegexOptions.Compiled, "en-US")]
private static partial Regex stripStateSuffix();
}

0 comments on commit ac4faf1

Please sign in to comment.