-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[[FIX]] change escape-sequence handler for double quotes (\") #3566
8000 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
Conversation
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.
Thanks for the patch! Could you add a unit test which demonstrates its correctness? The file tests/unit/core.js
seems like a good place for this. We could use a test case that fails in the current release of JSHint but passes with this patch applied. That will prove that this patch has the intended effect, and it will help us avoid accidentally breaking the new and improved behavior in the future.
Sure @jugglinmike I'll add a unit test for this. |
Hey @jugglinmike, I have added a unit test in the commit Also, can you please check the changes in the commit |
Beautiful! Thanks for the help! |
Changes the handling of escape sequence case for
\"
in the lex.js file. Earlier, it converted\"
into\\\"
, which is not the correct js equivalent for the case as it should be"
only. This was causing issue #3315 as\" != "
that is why jshint considers them different strings.Fixes and Closes #3315