Sha256: 7b11e539ce93dce49cbd6dbf80828f6195a3103cef9fef1a758b50485606ed26

Contents?: true

Size: 705 Bytes

Versions: 5

Compression:

Stored size: 705 Bytes

Contents

# Frozen-string-literal: true
# Copyright: 2012 - 2018 - MIT License
# Encoding: utf-8

module Jekyll
  module Assets
    module Patches
      module SassFunctions
        SprocketsString = ::Sprockets::Autoload::Sass::Script::String

        def asset_path(path, options = {})
          path, args = path.value.split(%r!\s+!, 2)
          path, fragment = URI.split(path).values_at(5, 8)
          path = sprockets_context.asset_path("#{path} #{args}", options)
          SprocketsString.new [path, fragment].compact.join("#")
        end
      end
    end
  end
end

# --
module Sprockets
  class SassProcessor
    module Functions
      prepend Jekyll::Assets::Patches::SassFunctions
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
jekyll-assets-3.0.12 lib/jekyll/assets/patches/functions.rb
jekyll-assets-3.0.11 lib/jekyll/assets/patches/functions.rb
jekyll-assets-3.0.10 lib/jekyll/assets/patches/functions.rb
jekyll-assets-3.0.9 lib/jekyll/assets/patches/functions.rb
jekyll-assets-3.0.8 lib/jekyll/assets/patches/functions.rb