-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
fix: provide an unquoted path argument for opt.resolve(path) #127
fix: provide an unquoted path argument for opt.resolve(path) #127
Conversation
36bc6ff
to
5de1d03
Compare
5de1d03
to
ebc8218
Compare
@madyankin done. |
@@ -0,0 +1,16 @@ | |||
// copied from https://github.com/lakenen/node-unquote | |||
|
|||
var reg = /['"]/; |
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.
I suspect this regexp will replace only the quotes and leave the backslashes. Shouldn't it be [\'\"]
?
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.
eslint tells me it can be removed.
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.
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.
My bad, I have read the code not thorough enough the first time. Everything is ok
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.
@madyankin If you want to keep it like where copied from, I will change it to [\'\"]
and add a // eslint-disable no-useless-escape
line to disable this rule.
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.
@madyankin ok.
Argument path is a quoted string In
opt.resolve(path)
which is not convient for user to use this api.Also, it is not an expected behaviour for pr #126.
For example:
Current behaviour:
Expected behaviour:
Sorry for my mistake.