Skip to content

Commit

Permalink
SearchCh: only capitalize lowercased stop names
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-albers committed May 14, 2023
1 parent f132419 commit dc52844
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,11 @@ public class SearchChProvider: AbstractNetworkProvider, QueryJourneyDetailManual
return (nil, nil)
}
if let m = stationName.match(pattern: P_SPLIT_NAME_FIRST_COMMA) {
return (m[0], m[1]?.capitalized)
if let name = m[1], name == name.lowercased() {
return (m[0], m[1]?.capitalized)
} else {
return (m[0], m[1])
}
}
return (nil, stationName)
}
Expand Down

0 comments on commit dc52844

Please sign in to comment.