-
-
Notifications
You must be signed in to change notification settings - Fork 772
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
feat: add option to ignore diacritics #773
base: main
Are you sure you want to change the base?
Conversation
Add `ignoreDiacritics` to ignore diacritics in search
Would be nice to have this feature, is someone still looking into it? |
@@ -109,3 +109,46 @@ describe('ignoreLocation when useExtendedSearch is true', () => { | |||
expect(result).toHaveLength(1) | |||
}) | |||
}) | |||
|
|||
describe('Searching using extended search ignoring diactrictics', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here and in other places in tests "diacritics" is spelled "diactrictics".
Hi @piitaya! Glad to see this is proposed by somebody. Sad that this doesn't get attention. I looked into your code, and this seems to be the only string transformation for the support of diacritics: Compare that with the code used by Wikimedia projects for the support of dicritics and other combining characters: https://github.com/wikimedia/oojs-ui/blob/9a2b2b42aac087db15c8a91fd6bbcef78dbd9898/src/mixins/LabelElement.js#L97-L98. This code basically powers Wikipedia when it comes to supporting combining characters in search. The character regexp there includes many more ranges, and it is equivalent to Unfortunately, this meme well-reflects the current situation in many libs working with text: |
Add
ignoreDiacritics
to ignore diacritics in search;This pr fixes #723
Others related issues :