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

Escape basename before interpreting as Regex #608

Closed
wants to merge 1 commit into from
Closed

Escape basename before interpreting as Regex #608

wants to merge 1 commit into from

Conversation

ajhyndman
Copy link

Fixes #605

If you'd rather not introduce a new dependency, I'm open to suggestions, but escape-string-regexp is literally 11 lines of code.

https://github.com/sindresorhus/escape-string-regexp/blob/master/index.js

@ajhyndman
Copy link
Author

Oh, I just realized that there are actually a half dozen other open PRs that also address this issue.

#607
#604
#566
#544

#544 might be the most robust, since it avoids ever attempting to parse the basename as a RegExp.

@ajhyndman
Copy link
Author

I'm going to close this PR in favour of #544!

@ajhyndman ajhyndman closed this Jan 23, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 25, 2019
mjackson added a commit that referenced this pull request Mar 27, 2019
@ajhyndman ajhyndman deleted the #605-escape-basename-before-interpreting-as-regex branch March 29, 2019 05:16
forl pushed a commit to forl/history that referenced this pull request Aug 12, 2019
mjackson added a commit that referenced this pull request Sep 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants