-
-
Notifications
You must be signed in to change notification settings - Fork 781
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
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: |
Giving it attention now. My apologies on the absence. |
Ok wow, I'd agree then that would need all this. What a lengthy list though...
|
Just pushed a new branch (https://github.com/krisk/Fuse/tree/ignore-diacritics) for this, along with a more complete diacritics support. |
Add
ignoreDiacritics
to ignore diacritics in search;This pr fixes #723
Others related issues :