Skip to content

issue-1397: Improved normalizeText-function and added more tests#1398

Merged
geosaaga merged 1 commit into
mainfrom
feature/1397-improve-normalizetext-function
Jul 17, 2026
Merged

issue-1397: Improved normalizeText-function and added more tests#1398
geosaaga merged 1 commit into
mainfrom
feature/1397-improve-normalizetext-function

Conversation

@geosaaga

Copy link
Copy Markdown
Collaborator

Closes #1397

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves the normalizeText behavior used by geolocation search so that diacritic stripping only affects Latin-script text (preserving non‑Latin scripts like Cyrillic), and extends unit tests to cover Cyrillic search and apostrophe normalization.

Changes:

  • Updated normalizeText to strip combining marks only after Latin-script characters, then recompose to NFC and normalize apostrophe variants.
  • Added test fixtures and test cases for Ukrainian/Cyrillic location search and apostrophe handling.
  • (Minor) Exposed getCountryName as an exported symbol.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/utils/geolocation.ts Adjusts normalization logic for better non‑Latin search behavior; also changes getCountryName visibility.
__tests__/utils/geolocation.test.ts Adds Cyrillic/Ukrainian fixtures and tests validating the updated normalization/search behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/utils/geolocation.ts
@geosaaga
geosaaga merged commit 97a1540 into main Jul 17, 2026
3 checks passed
@geosaaga
geosaaga deleted the feature/1397-improve-normalizetext-function branch July 17, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve normalizeText-function

2 participants