mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-17 01:40:42 -07:00
Test parsing of Liquid code in comments
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user