lib/sprockets/base.rb in sprockets-3.0.0.beta.2 vs lib/sprockets/base.rb in sprockets-3.0.0.beta.3
- old
+ new
@@ -174,10 +174,12 @@
bundled_processors = params[:skip_bundle] ? [] : unwrap_bundle_processors(type)
processors = bundled_processors.any? ? bundled_processors : processed_processors
processors += unwrap_encoding_processors(params[:encoding])
- if processors.any?
+ # Read into memory and process if theres a processor pipeline or the
+ # content type is text.
+ if processors.any? || mime_type_charset_detecter(type)
asset.merge!(process(
[method(:read_input)] + processors,
asset[:uri],
asset[:filename],
asset[:load_path],