-
Notifications
You must be signed in to change notification settings - Fork 32
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 -
?
#28
Comments
Also related, discussion in #17 |
I don't think there's any concern with over-escaping here. The important thing Escaping every single character might be a bit extreme, but certainly escaping the ones that might be problematic in some cases doesn't seem to be. |
Maybe what we want is a table in the readme with each escaped character and a reason why it's escaped (preferably in the form |
Context:
Note that this does not include I suspect that this might be the cases in many places where something is inserted into |
Yes, but if you want On Sat, Jun 20, 2015 at 1:56 PM, Nikita Popov [email protected]
|
Superseding this with #29 |
Currently the proposal escapes
]
and}
which isn't really required since we escape[
and{
. The only reason we might need to escape]
is because we need to support the case that the pattern is inserted inside the[
.A preliminary GH code search shows that this pattern is actually used. In particular, underscore's string model does
"[" + escapedRegExp +"]
.So, in my opinion we should support escaping inside matched sets to be on the safe side, this is somewhat wasteful (because there are other characters that do not need to be escaped in sets but the pattern is very common.
Opinions?
The text was updated successfully, but these errors were encountered: