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 #402

Open
wants to merge 1 commit into
base: main
Choose a base branch
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.

Fixes #399

Copy link

codecov bot commented Nov 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.12%. Comparing base (d32b12a) to head (bad2190).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #402   +/-   ##
=======================================
  Coverage   82.12%   82.12%           
=======================================
  Files          68       68           
  Lines        8678     8678           
=======================================
  Hits         7127     7127           
  Misses       1551     1551           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

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.

Failed to load search results for Chinese query words
1 participant