Fix passing template locals down to partials. Helps #1753
This commit is contained in:
parent
24ef35026e
commit
9553796731
|
@ -276,5 +276,14 @@ class Middleman::CoreExtensions::DefaultHelpers < ::Middleman::Extension
|
|||
|
||||
super(path, params)
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue