Test parsing of Liquid code in comments

This commit is contained in:
Christophe Naud-Dulude
2021-11-30 11:56:49 -05:00
parent db3999a008
commit f3638b3eb4
2 changed files with 29 additions and 0 deletions
+4
View File
@@ -15,15 +15,19 @@ module Liquid
attr_reader :variable
def initialize(tag_name, markup, parse_context)
puts "Initializing Echo tag"
super
@variable = Variable.new(markup, parse_context)
end
def render(context)
puts "Render Echo tag"
@variable.render_to_output_buffer(context, +'')
end
class ParseTreeVisitor < Liquid::ParseTreeVisitor
puts "ParseTreeVisitor Echo tag"
def children
[@node.variable]
end