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

Accent insensitive search feature #6448

Open
wickedest opened this issue Oct 23, 2020 · 1 comment
Open

Accent insensitive search feature #6448

wickedest opened this issue Oct 23, 2020 · 1 comment

Comments

@wickedest
Copy link

I have a user asking me for an accent insensitive search. However, Mergely is using CodeMirror's search and searchcursor addons, but they don't seem to have this feature. A SO ticket shows the way to strip accents from strings:

line.normalize('NFD').replace(/[\u0300-\u036f]/g, '');

Seems like a relatively easy feature to implement.

@marijnh
Copy link
Member

marijnh commented Apr 29, 2021

CodeMirror 6 allows you to pass a normalize function to SearchCursor to implement stuff like this. That doesn't exist in 5.x yet though. I'm definitely not interested in hard-coding a range like that (which matches a rather arbitrary set of accents).

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

No branches or pull requests

2 participants