mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-16 17:30:43 -07:00
Move the parse method out of Tag, only blocks need the body parsed.
The parse method should be renamed to something like parse_body, since that is how it is used, and no non-block tags were using the parse method.
This commit is contained in:
@@ -5,6 +5,11 @@ module Liquid
|
||||
FullToken = /\A#{TagStart}\s*(\w+)\s*(.*)?#{TagEnd}\z/om
|
||||
ContentOfVariable = /\A#{VariableStart}(.*)#{VariableEnd}\z/om
|
||||
|
||||
def initialize(tag_name, markup, tokens)
|
||||
super
|
||||
parse(tokens)
|
||||
end
|
||||
|
||||
def blank?
|
||||
@blank || false
|
||||
end
|
||||
|
||||
@@ -19,9 +19,6 @@ module Liquid
|
||||
@options = options
|
||||
end
|
||||
|
||||
def parse(tokens)
|
||||
end
|
||||
|
||||
def name
|
||||
self.class.name.downcase
|
||||
end
|
||||
|
||||
@@ -35,9 +35,6 @@ module Liquid
|
||||
end
|
||||
end
|
||||
|
||||
def parse(tokens)
|
||||
end
|
||||
|
||||
def blank?
|
||||
false
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user