-
Notifications
You must be signed in to change notification settings - Fork 6
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: Validate style attributes on the RHS #222
Conversation
We currently ignore empty styles in RHS which is quite surprising. This commit fixes it by validating the RHS styles.
Pull Request Test Coverage Report for Build 832
💛 - Coveralls |
1 similar comment
Pull Request Test Coverage Report for Build 832
💛 - Coveralls |
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.
Looks good! It highlights that it would be good to introduce a proper CSS parser.
What are you implying there is something wrong with our regex machine 😜 |
Not for a second :) |
This looks really good. I think it's the right balance of not being overly prescriptive but still protecting the user at the point of checks. Just one thing I wanted to double check, but in the case of an empty string style on the RHS I guess anything still satisfies? The only reason I ask is I believe that is the behaviour of "class" and keeping consistency would be a win. |
That would pass as it would translate to the empty object on the RHS. |
Released as unexpected-dom@4.8.0 |
We currently ignore empty styles in RHS which is quite surprising. This PR
fixes it by validating the RHS styles.