Skip to content

Conversation

@steven10a
Copy link
Collaborator

Adds Unicode support for keyword search as suggested by @yehorkardash in PR 41

  • \b in regex doesn't work so well with Unicode characters. Replaced it with \p to be compatible with Unicode characters
  • Added additional tests

Copilot AI review requested due to automatic review settings November 18, 2025 21:45
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the keywords check functionality to properly support Unicode characters in keyword matching. The previous implementation used \b word boundaries which don't work correctly with non-ASCII characters like Chinese, Arabic, or Cyrillic scripts.

Key Changes:

  • Replaced simple \b word boundaries with Unicode-aware boundary detection using \p{L} and \p{N} patterns
  • Implemented per-keyword boundary logic that handles keywords starting or ending with punctuation
  • Added comprehensive test coverage for Unicode characters, mixed scripts, and edge cases with special characters

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/checks/keywords.ts Implements Unicode-aware word boundary detection with lookahead/lookbehind assertions and adds helper function to determine word characters
src/tests/unit/checks/keywords-urls.test.ts Adds extensive test cases covering partial word matching, Unicode scripts (Chinese, Arabic, Cyrillic), special character handling, and mixed script scenarios

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gabor-openai
Copy link
Collaborator

@codex please review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Keep them coming!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@steven10a steven10a requested a review from Copilot November 19, 2025 15:07
Copilot finished reviewing on behalf of steven10a November 19, 2025 15:10
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gabor-openai gabor-openai merged commit e174356 into main Nov 19, 2025
6 of 7 checks passed
@steven10a steven10a deleted the dev/steven/keyword_unicode branch November 19, 2025 20:30
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.

3 participants