lib/munge/helpers/rendering.rb in munge-0.17.0 vs lib/munge/helpers/rendering.rb in munge-0.18.0

- old
+ new

@@ -1,21 +1,21 @@ module Munge module Helpers module Rendering def render(item, engines: nil, data: {}, content_override: nil) - content = content_override || item.content + content = content_override || item.content renderers = tilt_renderer_list(item, engines) - mdata = merged_data(item.frontmatter, data, self_item: item) + mdata = merged_data(item.frontmatter, data, self_item: item) item_path = item.relpath render_string(content, data: mdata, engines: renderers, template_name: item_path) end def layout(item_or_string, data: {}, &block) layout_item = resolve_layout(item_or_string) - renderers = tilt_renderer_list(layout_item, nil) - mdata = merged_data(layout_item.frontmatter, data, self_layout: layout_item) + renderers = tilt_renderer_list(layout_item, nil) + mdata = merged_data(layout_item.frontmatter, data, self_layout: layout_item) layout_path = "(layout) #{layout_item.relpath}" render_string(layout_item.content, data: mdata, engines: renderers, template_name: layout_path, &block) end @@ -26,10 +26,10 @@ end output = engines .reduce(content) do |memoized_content, engine| - options = tilt_options[engine] + options = tilt_options[engine] template = engine.new(template_name, options) { memoized_content } template.render(self, data) { inner } end