Document XPath funs

This commit is contained in:
Clément Fournier
2019-03-06 01:29:53 +01:00
parent 45291fb6d8
commit 787a6a4a4d
8 changed files with 320 additions and 13 deletions

View File

@@ -161,7 +161,7 @@ class JavadocTag < Liquid::Tag
end
def markup_link(rname, link)
"[`#{rname}`](#{link})"
"<a href=\"#{link}\"><code>#{rname}</code></a>"
end

View File

@@ -0,0 +1,19 @@
require 'pp'
#
# Tags to create a complex object inline in JSON.
#
class RenderBlock < Liquid::Block
def initialize(tag_name, arg, tokens)
super
@body = tokens
end
def render(context)
template = @body.render(context)
pp template
pp Liquid::Template.parse(template).render(context)
end
end
Liquid::Template.register_tag('render', RenderBlock)