-
-
Notifications
You must be signed in to change notification settings - Fork 411
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
[Merged by Bors] - Fix regex literal /[/]/ #2277
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2277 +/- ##
==========================================
+ Coverage 41.48% 41.66% +0.18%
==========================================
Files 234 234
Lines 21987 22000 +13
==========================================
+ Hits 9121 9166 +45
+ Misses 12866 12834 -32
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
VM implementation
Fixed tests (2):
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice find. I think there is still a problem if an escaped ]
is placed before the end of the character class right?
/[\]/]/
should be a valid regex but would not be lexed correctly with this approach.
@raskad Could you elaborate? I think there is no problem with |
True, the error I was looking at is unrelated and only happens in the boa_cli. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice fix, thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Thanks for the fix :)
Bors r+ |
This PR fixes a case where a forward slash is located in a regex class: `let regex = /[/]/;`. In this case, the forward slash should not close the regex literal. This fixes `test/built-ins/RegExp/regexp-class-chars.js`
Pull request successfully merged into main. Build succeeded: |
This PR fixes a case where a forward slash is located in a regex class:
let regex = /[/]/;
. In this case, the forward slash should not close the regex literal.This fixes
test/built-ins/RegExp/regexp-class-chars.js