lib/roadie/inliner.rb
# Regexp matching all the url() declarations in CSS
#
# It matches without any quotes and with both single and double quotes
# inside the parenthesis. There's much room for improvement, of course.
Regexp matching all the url() declarations in CSS
It matches without any quotes and with both single and double quotes
inside the parenthesis. There's much room for improvement, of course.
Regexp matching all the url () declarations in CSS It matches without any quotes and with both single and double quotes inside the parenthesis . There ' s much room for improvement of course .
def extract_link_elements
        all_link_elements_to_be_inlined_with_url.each do |link, url|
          asset_filename = url.path.gsub(@asset_path_prefix, '')
          asset = Rails.application.assets[asset_filename]
          raise CSSFileNotFound.new(asset_filename, link['href']) if !asset
          @inline_css << asset.to_s
          link.remove
        end
      end
def extract_link_elements all_link_elements_to_be_inlined_with_url . each do | link , url | asset_filename = url . path . gsub ( @asset_path_prefix , '' ) asset = Rails . application . assets [ asset_filename ] raise CSSFileNotFound . new ( asset_filename , link [ 'href' ] ) if ! asset @inline_css << asset . to_s link . remove end end
Regexp matching all the url() declarations in CSS
It matches without any quotes and with both single and double quotes
inside the parenthesis.
Regexp matching all the url () declarations in CSS It matches without any quotes and with both single and double quotes inside the parenthesis .
# Remove asset path prefix from url and pass the rest to Rails asset pipeline