-
Notifications
You must be signed in to change notification settings - Fork 528
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
Add an exception for partial ident in the space-around-operator rule #940
Add an exception for partial ident in the space-around-operator rule #940
Conversation
1 similar comment
1fb6ca0
to
7b42052
Compare
* @returns {bool} true / false | ||
*/ | ||
var isPartialIdent = function (operator, next, previous) { | ||
return next.is('interpolation') && previous.is('interpolation'); |
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.
Are we 100% sure that next and previous will be defined, we've seen a lot of errors of the type is of undefined
before.
@@ -333,6 +333,8 @@ $qux: (2 +1) | |||
|
|||
$foo: scale-color($foo, $lightness: -14%) | |||
|
|||
$foobar: #{$foo}-#{$bar} |
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.
Not sure it's a working example but sassmeister parses this
$bar: 'test';
.test {
content: #{$bar}-4;
}
should probably check this isn't a error either.
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.
Thinking about it, for a partial ident, the previous node only needs to be an interp. It doesn't matter about the next node.
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.
Yeah, that's what I was thinking..
This PR fixes #929 which was giving a false positive when a hyphen was used in-between two interpolations. Since this hyphen
-
is a partial ident, an exception has been added to the rule.<DCO 1.1 Signed-off-by: Ben Griffith gt11687@gmail.com>