mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-19 10:52:48 -07:00
Avoid storing options instance variable in BlockBody.
There is no need to pass parse options to the BlockBody initializer, since it does all the parsing in the parse method, unlike tags which parse the tag markup in the initializer.
This commit is contained in:
committed by
Justin Li
parent
73fcd42403
commit
15e1d46125
+2
-2
@@ -6,7 +6,7 @@ module Liquid
|
||||
end
|
||||
|
||||
def parse(tokens)
|
||||
@body = BlockBody.new(options)
|
||||
@body = BlockBody.new
|
||||
while more = parse_body(@body, tokens)
|
||||
end
|
||||
end
|
||||
@@ -60,7 +60,7 @@ module Liquid
|
||||
protected
|
||||
|
||||
def parse_body(body, tokens)
|
||||
body.parse(tokens) do |end_tag_name, end_tag_params|
|
||||
body.parse(tokens, options) do |end_tag_name, end_tag_params|
|
||||
@blank &&= body.blank?
|
||||
|
||||
return false if end_tag_name == block_delimiter
|
||||
|
||||
Reference in New Issue
Block a user