Fix passing template locals down to partials. Helps #1753

This commit is contained in:
Thomas Reynolds 2016-01-26 11:01:12 -08:00
parent 24ef35026e
commit 9553796731

View file

@ -276,5 +276,14 @@ class Middleman::CoreExtensions::DefaultHelpers < ::Middleman::Extension
super(path, params) super(path, params)
end end
def partial(template, options={}, &block)
including_parent_locals = {}
including_parent_locals.merge!(@locs || {})
including_parent_locals.merge!(options[:locals] || {})
options[:locals] = including_parent_locals
super(template, options, &block)
end
end end
end end