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:
Dylan Thacker-Smith
2014-11-03 17:07:42 -05:00
committed by Justin Li
parent 73fcd42403
commit 15e1d46125
6 changed files with 29 additions and 28 deletions
+2 -2
View File
@@ -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