-
-
Notifications
You must be signed in to change notification settings - Fork 54
Forward slash is not escaped #30
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
Comments
Why should it? Running |
I suppose this is reasonable, but I'd appreciate implementing it anyway (as it does no harm AFAIK) or highlighting it in the docs. My case is a little unusual, I'm passing the regexp into the |
Package description:
It would be both surprising and incorrect if we escaped other characters. |
I guess we could make it clearer in the readme that only the minimal amount of escaping is done. |
Thanks, that would work :) |
…edge cases There have been multiple requests to escape additional characters, so this makes it clearer that minimal escaping is done (per sindresorhus#30 (comment)). It also gives a solution for more involved context-aware escaping that handles numerous edge cases, for situations when developers need to insert an escaped string at an arbitrary position in a regex.
The text was updated successfully, but these errors were encountered: