lib/nanoc/helpers/rendering.rb in nanoc-4.0.0b3 vs lib/nanoc/helpers/rendering.rb in nanoc-4.0.0b4
- old
+ new
@@ -90,11 +90,11 @@
assigns = {
content: captured_content,
item: @item,
item_rep: @item_rep,
items: @items,
- layout: Nanoc::LayoutView.new(layout),
+ layout: Nanoc::LayoutView.new(layout), # FIXME: this does not need to be rewrapped
layouts: @layouts,
config: @config,
site: @site
}.merge(other_assigns)
@@ -112,10 +112,12 @@
begin
# Notify start
Nanoc::Int::NotificationCenter.post(:processing_started, layout)
# Layout
- result = filter.setup_and_run(layout.raw_content, filter_args)
+ content = layout.unwrap.content
+ arg = content.binary? ? content.filename : content.string
+ result = filter.setup_and_run(arg, filter_args)
# Append to erbout if we have a block
if block_given?
# Append result and return nothing
erbout = eval('_erbout', block.binding)