mirror of
https://github.com/kemko/liquid.git
synced 2026-01-05 01:35:41 +03: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/o
|
||||
ContentOfVariable = /\A#{VariableStart}(.*)#{VariableEnd}\z/o
|
||||
|
||||
def initialize(tag_name, markup, tokens)
|
||||
super
|
||||
parse(tokens)
|
||||
end
|
||||
|
||||
def blank?
|
||||
@blank || false
|
||||
end
|
||||
|
||||
@@ -16,10 +16,6 @@ module Liquid
|
||||
@tag_name = tag_name
|
||||
@markup = markup
|
||||
@options ||= {} # needs || because might be set before initialize
|
||||
parse(tokens)
|
||||
end
|
||||
|
||||
def parse(tokens)
|
||||
end
|
||||
|
||||
def name
|
||||
|
||||
@@ -35,9 +35,6 @@ module Liquid
|
||||
super
|
||||
end
|
||||
|
||||
def parse(tokens)
|
||||
end
|
||||
|
||||
def blank?
|
||||
false
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user