def process_scripts (out)
      out.gsub /(<script\b[^>]*?>([\s\S]*?)<\/script>)\s*/i do
        js = $2
        m = $1.gsub /^<script\s([^>]+)>/i do |m|
          attrs(m, 'script', true)
        end
        begin
          js_compressed = HtmlPress.js_compressor js, @options[:js_minifier_options]
          m.gsub!(">#{js}<\/script>", ">#{js_compressed}<\/script>")
        rescue MultiJs::ParseError => e
          log e.message
        end
        reserve m
      end
    end
def process_scripts (out)
      out.gsub /(<script\b[^>]*?>([\s\S]*?)<\/script>)\s*/i do
        js = $2
        m = $1.gsub /^<script\s([^>]+)>/i do |m|
          attrs(m, 'script', true)
        end
        begin
          js_compressed = HtmlPress.js_compressor js, @options[:js_minifier_options]
          m.gsub!(">#{js}<\/script>", ">#{js_compressed}<\/script>")
        rescue MultiJs::ParseError => e
          log e.message
        end
        reserve m
      end
    end
replace SCRIPTs (and minify) with placeholders