thumblemonks / smurf

Rails plugin to automatically minify JavaScript and CSS when their bundles get cached
http://gusg.us/code/ruby/smurf-rails-autominifying-js-css-plugin.html
MIT License
193 stars 12 forks source link

Stylesheet::Minifier should not remove spaces inside media query blocks #22

Open gsmendoza opened 12 years ago

gsmendoza commented 12 years ago
Given Smurf 1.0.8
And I have the following content
  content = " @media screen and (min-width: 720px) { .flight-group .date h2 { display: none; } } "
When I include Minifier in the content
  class << content; include Smurf::Stylesheet::Minifier; end
And I remove the spaces inside the blocks of the content
  content.remove_spaces_inside_block
Then I should get
  " @media screen and (min-width: 720px) {.flight-group .date h2{display:none;} } "
But instead I get
  " @media screen and (min-width: 720px) {.flight-group.dateh2{display:none;} } "