Skip to content

Desktop: fix #3171: add support for matching text with diacritics for GotoAnything #3183

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

Merged
merged 2 commits into from
Jun 2, 2020
Merged

Conversation

ylc395
Copy link
Contributor

@ylc395 ylc395 commented May 9, 2020

fix #3171. When matching text for highlighting, use diacritics-removed keywords to match diacritics-removed body.

FYI: I find anohter way to remove diacritics:

function removeDiacritics(str) {
  return str
    .normalize('NFD')
    .replace(/[\u0300-\u036f]/g, '');
}

Should we replace the origin implementation in string-utils.js with this implementation?

@ylc395 ylc395 changed the title Desktop: fix #3171 Desktop: Bugfix #3171 May 9, 2020
@laurent22
Copy link
Owner

We need a description of what this pull request does. Also please give the issue a meaningful title, according to the template: https://github.com/laurent22/joplin/blob/master/.github/PULL_REQUEST_TEMPLATE

@ylc395 ylc395 changed the title Desktop: Bugfix #3171 Desktop: add support for matching text with diacritics for GotoAnything May 11, 2020
@ylc395 ylc395 changed the title Desktop: add support for matching text with diacritics for GotoAnything Desktop: fix #3171: add support for matching text with diacritics for GotoAnything May 11, 2020
@laurent22
Copy link
Owner

Ok that looks good, thanks for the fix @ylc395

@laurent22 laurent22 merged commit 3b40de1 into laurent22:master Jun 2, 2020
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.

Error with CTRL-G search when accents are involved
2 participants