-
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
Which leading characters should be escaped? #66
Comments
The explainer argues that the output of |
#29 is indeed analogous, and #29 (comment) is a concise explanation of affected scenarios. However, I don't see a clear decision on this question in either that issue or #37. |
I'm inclined to say that the context after It's not like |
That matches my intuition here. |
|
The question is whether that surprise is a problem we should solve. I don't think it is. There is no reasonable expectation for what behavior you're going to get if you write I think it's fine to say that the output of |
Sounds like we're in agreement here, so I'll close this, but will reopen if that's inaccurate. |
Reopening pending confirmation from @gibson042 and @erights. |
To clarify for those watching this thread. Template tags would enable safe context sensitive escaping. I originally objected to Later on in the current tc39 meeting, we'll discuss Therefore, I feel strongly that the first character needs to be adequately escaped to restore that simple safety property. My concern does not hinge on whether one would write |
As noted in #58 (comment) , an unescaped non-digit leading character could still be interpreted as part of an escape sequence spanning concatenated
RegExp.escape
output.The text was updated successfully, but these errors were encountered: