-
Notifications
You must be signed in to change notification settings - Fork 47
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
Words "left" and "right" flipped in selectors before a comma #35
Comments
@NiviJah A comma What bug are you experiencing? The given example seems to flip without problems. /* CSSJanus output */
[class*="span"].pull-left,
.row-fluid [class*="span"].pull-right {
float: left;
} |
Thanks, I did see that being flipped but assumed that was intentional. But then I noticed that we don't have explicit code for that indeed. And more importantly, we currently only flip the words "left" and "right" in selectors before a comma. .foo-left,
.bar-left,
.baz-left { } This would currently flip |
Change lookAheadNotOpenBracePattern to allow selectors to match "" patterns (eg [class="span"]) and selectors with comments interspersed. This fixes issue wikimedia#35, where text before either comments or attribute selectors using double quotes were not being considered part of the selector, and having text flipped as though they were part of rules. (Eg `.right [class="span"] { float: right; }` was flipped to `.left` .)
Consider this example
the code doesn't take the "," as end of rule and therefor transform it as well.
I'm kindda new to Regex but I came up with this solution for now :
The text was updated successfully, but these errors were encountered: