don’t override :custom if already set

Sometimes Sprockets needs to access
`options[:custom][:sprockets_context]`. If this is set, it should not be
overridden. This happens when building a LivingStyleGuide file when the
Sass source uses `asset-path`, `image-url` or similar functions.
This commit is contained in:
Nico Hagenburger 2015-02-09 23:16:20 +01:00
parent e4b7d4fff0
commit a5c65bac53

View file

@ -105,7 +105,7 @@ module Middleman
filename: eval_file,
line: line,
syntax: syntax,
custom: { middleman_context: ctx.app }
custom: (options[:custom] || {}).merge(middleman_context: ctx.app)
}
if ctx.is_a?(::Middleman::TemplateContext) && file