Skip to content

Conversation

klutchell
Copy link
Contributor

No description provided.

@Copilot Copilot AI review requested due to automatic review settings March 14, 2025 15:53
Copy link
Contributor

@Copilot 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 adds a helper method to properly escape special regex characters in glob input strings and extends test cases to ensure these edge cases are correctly handled.

  • Introduces escapeRegExp in lib/glob.js to escape special characters.
  • Updates glob matching logic for non-glob patterns.
  • Adds comprehensive tests in test/unit/lib/glob.test.ts for inputs with special regex characters.

Reviewed Changes

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

File Description
test/unit/lib/glob.test.ts Adds tests to verify glob patterns with special regex characters
lib/glob.js Updates non-glob pattern handling by escaping special regex characters via a new helper
Comments suppressed due to low confidence (1)

lib/glob.js:12

  • The property name 'regexptText' might be a typo; consider renaming it to 'regexpText' for clarity.
this.regexptText = this.globize(this.glob)

@klutchell klutchell force-pushed the kyle/glob-patch branch 5 times, most recently from 9992e55 to c7fb6ce Compare March 17, 2025 20:02
@klutchell klutchell changed the title Add helper method to escape special glob characters Create a fresh copy of the base repository config Mar 18, 2025
@klutchell klutchell closed this Mar 25, 2025
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.

1 participant