pmd/docs/_plugins/render_block.rb
Clément Fournier 9084980203 Update again
2020-02-05 20:46:17 +01:00

18 lines
337 B
Ruby

#
# Apply a second pass of rendering on a block
#
class RenderBlock < Liquid::Block
def initialize(tag_name, arg, tokens)
super
@body = tokens
end
def render(context)
template = @body.render(context)
Liquid::Template.parse(template).render(context)
end
end
Liquid::Template.register_tag('render', RenderBlock)