-
Notifications
You must be signed in to change notification settings - Fork 47
Closed
Description
We recently updated our application from the 0.2.0 release of the gem to the current master. Now our application_split2.css file is always empty even though it is well past the 4095 selector count. After a bit of debugging, this clause in splitter.rb:42 always evaluates to true for every rule in the file. Therefore, nothing is ever written to the split file.
if rule =~ /^\s*}$/
current_media = nil
# skip the line if the close bracket is the first rule for the new file
next if first_hit
end
I wrote a simple test to verify:
def test_split_string_failure
second_part = CssSplitter::Splitter.split_string(File.read('test/dummy/app/assets/stylesheets/test_stylesheet_with_media_queries.css'), 2)
refute_empty second_part
end
Is anyone else seeing this issue?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels