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

Fix search term match and highlight for Unicode chars #347

Closed
wants to merge 1 commit into from

Conversation

Bizordec
Copy link
Contributor

A regular expression /\w+/g was added in PR #307, which broke the search for non-english words.

I changed it to /\p{L}+/gu to add support for all Unicode characters and removed redundant word boundary (\b) in highlight regex.

@2bndy5
Copy link
Collaborator

2bndy5 commented May 4, 2024

Note

The search implementation will be changing completely upon merging #338; it will more closely follow upstream's behavior known as "the builtin search plugin". I doubt this hack would be needed after that. Furthermore, this hack might become more of a user customization.

@Bizordec
Copy link
Contributor Author

Bizordec commented May 6, 2024

Ok then, for now I'll rollback to v0.11.9, since this version has working search (but not highlighting) for Unicode.

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.

2 participants