lib/webgen/path_handler/page_utils.rb in webgen-1.3.0 vs lib/webgen/path_handler/page_utils.rb in webgen-1.4.0

- old
+ new

@@ -37,12 +37,14 @@ content_processor = context.website.ext.content_processor context.website.ext.item_tracker.add(context.dest_node, :node_content, self) context.content = blocks[name].dup context[:block_name] = name - pipeline ||= ((self['blocks'] || {})[name] || {})['pipeline'] || - ((self['blocks'] || {})['defaults'] || {})['pipeline'] || - [] + pipeline ||= if (t = self['blocks']) && (t = t[name] || t['defaults']) && t.key?('pipeline') + t['pipeline'] + else + [] + end content_processor.normalize_pipeline(pipeline).each do |processor| content_processor.call(processor, context) end context[:block_name] = nil context