Skip to content
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

Very weird minification behavior #255

Closed
danieltott opened this issue Mar 7, 2014 · 3 comments
Closed

Very weird minification behavior #255

danieltott opened this issue Mar 7, 2014 · 3 comments

Comments

@danieltott
Copy link

This block of code:

.selector-0, .abc {
margin-left: 0;
}
Results in this minification:

.abc,.selector0{margin-left:0}
Which you can see is incorrect. I have no idea why this is happening.

This happens with any selector that ends in "-0" - not "-1" or any other digit, and it only happens when it is followed by another selector.

Here's a gist with some more examples:
https://gist.github.com/danieltott/35969292a7605a4883e4

@GoalSmashers
Copy link
Contributor

Good catch @danieltott! That's because of too greedy regular expressions.

2.1.5 is out in npm repository!

@danieltott
Copy link
Author

Thanks for the quick reply and fix!

@GoalSmashers
Copy link
Contributor

Sure, enjoy! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants