Proxy Convertible#render_liquid to Renderer

This commit is contained in:
Parker Moore 2016-08-30 14:14:12 -07:00
parent d0f57b61d4
commit 8496e2e8b6
No known key found for this signature in database
GPG Key ID: 193CDEBA72063C58
1 changed files with 1 additions and 11 deletions

View File

@ -103,17 +103,7 @@ module Jekyll
#
# Returns the converted content
def render_liquid(content, payload, info, path)
template = site.liquid_renderer.file(path).parse(content)
template.warnings.each do |e|
Jekyll.logger.warn "Liquid Warning:",
LiquidRenderer.format_error(e, path || self.path)
end
template.render!(payload, info)
# rubocop: disable RescueException
rescue Exception => e
Jekyll.logger.error "Liquid Exception:",
LiquidRenderer.format_error(e, path || self.path)
raise e
_renderer.render_liquid(content, payload, info, path)
end
# rubocop: enable RescueException