-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Conversation
Fix some issues with the selectors in the final CSS form.
…in' into rlim/less-and-scss-tests
…rackets into rlim/less-and-scss-tests
…rackets into rlim/less-and-scss-tests
…in' into rlim/less-and-scss-tests
…`&` issue. Fix a JSLint error in unit test file and adjust a string for group selector verification.
@RaymondLim there are other changes here too. Does this PR cover more than just adding unit tests? |
Looks like changes to fix issues and to please the test cases. |
I created this pull request branch from rlim/parse-less-and-scss branch before puill request #8844 landed in master. So all changes in #8844 also show up in this pull request. I just merge master to this branch and after pushing the merge all those changes in #8844 no longer show up. So it's ready to review. You will see some changes in CSSUtils.js -- those changes are fixes for #8894 and #8895. |
}); | ||
return finalSelectorArray.join(", "); | ||
} | ||
|
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 moved out these two functions from findSelectorAtDocumentPos
scope to the module scope so that I can call _getSelectorInFinalCSSForm
from other functions in the module. The only change that I made in _getSelectorInFinalCSSForm
is ps = cs.replace("&", ps);
--> ps = cs.replace(/&/g, ps);
.
* Returns trimmed selector if it is not an at-rule, or null if it starts with @. | ||
* | ||
* @param {string} selector | ||
* @return {?string} |
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.
This should be @return {string}
. The ?
indicates nullable, and return value can be empty, but not null.
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 point!
Done with initial review. |
…rd and worrisome. But I couldn't find the root cause for this behavior yet.
…e added to workingset
@redmunds I'm done with adding tests. |
…nclude block. Add some more unit tests to verify the fixes.
Conflicts: test/UnitTestSuite.js
@redmunds All changes are pushed and merge conflicts are solved. Ready for review. |
}); | ||
}); | ||
|
||
// https://github.com/adobe/brackets/issues/8895 |
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.
Indent this comment same as here.
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.
Argh... Thanks ;-)
Done with second review. I have a few questions, and there's a little cleanup to do. |
@redmunds Thanks for your reviews and questions. @ingorichter will take care of cleanup as they're in CSS inline editor tests. |
@RaymondLim @ingorichter Looks good. Squash the commits and I'll merge it. |
Closing for a new squashed pr. |
Also fixes for #8894 and #8895.