Download this file
18 lines (14 with data), 337 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 | #
# 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)
|
×
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.