Skip to content

fix(search): match places regardless of accents - #303

Merged
yakew7 merged 1 commit into
StudentSuite:mainfrom
uzumakienes:uzumakienes-patch-1
Oct 23, 2026
Merged

yakew7 merged 1 commit into
StudentSuite:mainfrom
uzumakienes:uzumakienes-patch-1

Conversation

@uzumakienes

Copy link
Copy Markdown
Contributor

What this changes

Closes #291. Adds foldText() to src/lib/utils.ts (NFD, strip combining marks, lower-case, plus ł, ø, đ, ı) and uses it on both the query and the place name in filterPlaces and in searchSite, so esenboga, krakow and francaise find Esenboğa, Kraków and Française, and accented queries still match. Tests added for foldText, the map search and the nav search.

The combining marks are stripped with [\u0300-\u036f] rather than \p{M}, because tsconfig.json targets ES2017.

Type of change

  • New public place(s)
  • New or updated benefit guide
  • New or updated resource link
  • Code or fix
  • Docs

Checklist

  • The site hosts no copyrighted files; resource and paper changes are links only.
  • No em dashes in any copy.

AI disclosure: this change was prepared with Claude Code. The test suite was not run locally; the folding function was checked separately against the examples in the issue.

🤖 Generated with Claude Code

https://claude.ai/code/session_013HYYsiY4FhVN7hNWkVRoSK

@vercel

vercel Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

@uzumakienes is attempting to deploy a commit to the studentsuite Team on Vercel.

A member of the Team first needs to authorize it.

@yakew7
yakew7 merged commit 91ea496 into StudentSuite:main Oct 23, 2026
4 of 5 checks passed
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.

Place search ignores diacritics: esenboga does not match Esenboğa

2 participants