mirror of
https://github.com/Shopify/liquid.git
synced 2026-10-03 00:55:11 -07:00
Rename Block#parse to parse_body since that is how it is being used.
This commit is contained in:
+2
-2
@@ -7,14 +7,14 @@ module Liquid
|
|||||||
|
|
||||||
def initialize(tag_name, markup, tokens)
|
def initialize(tag_name, markup, tokens)
|
||||||
super
|
super
|
||||||
parse(tokens)
|
parse_body(tokens)
|
||||||
end
|
end
|
||||||
|
|
||||||
def blank?
|
def blank?
|
||||||
@blank || false
|
@blank || false
|
||||||
end
|
end
|
||||||
|
|
||||||
def parse(tokens)
|
def parse_body(tokens)
|
||||||
@blank = true
|
@blank = true
|
||||||
@nodelist ||= []
|
@nodelist ||= []
|
||||||
@nodelist.clear
|
@nodelist.clear
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ module Liquid
|
|||||||
# we don't need markup to open this block
|
# we don't need markup to open this block
|
||||||
def initialize(tokens, options = {})
|
def initialize(tokens, options = {})
|
||||||
@options = options
|
@options = options
|
||||||
parse(tokens)
|
parse_body(tokens)
|
||||||
end
|
end
|
||||||
|
|
||||||
# There isn't a real delimiter
|
# There isn't a real delimiter
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ module Liquid
|
|||||||
class Raw < Block
|
class Raw < Block
|
||||||
FullTokenPossiblyInvalid = /\A(.*)#{TagStart}\s*(\w+)\s*(.*)?#{TagEnd}\z/o
|
FullTokenPossiblyInvalid = /\A(.*)#{TagStart}\s*(\w+)\s*(.*)?#{TagEnd}\z/o
|
||||||
|
|
||||||
def parse(tokens)
|
def parse_body(tokens)
|
||||||
@nodelist ||= []
|
@nodelist ||= []
|
||||||
@nodelist.clear
|
@nodelist.clear
|
||||||
while token = tokens.shift
|
while token = tokens.shift
|
||||||
|
|||||||
Reference in New Issue
Block a user