Merge loops

This commit is contained in:
Peter Zhu
2020-10-27 10:42:30 -04:00
parent 5c082472a1
commit 292d971937
2 changed files with 6 additions and 6 deletions

View File

@@ -21,10 +21,10 @@ module Liquid
def parse(tokens)
body = new_body
body = @blocks.last.attachment while parse_body(body, tokens)
if blank?
@blocks.each { |condition| condition.attachment.remove_blank_strings }
@blocks.each do |condition|
condition.attachment.remove_blank_strings if blank?
condition.attachment.freeze
end
@blocks.each { |condition| condition.attachment.freeze }
end
def nodelist

View File

@@ -31,10 +31,10 @@ module Liquid
def parse(tokens)
while parse_body(@blocks.last.attachment, tokens)
end
if blank?
@blocks.each { |condition| condition.attachment.remove_blank_strings }
@blocks.each do |block|
block.attachment.remove_blank_strings if blank?
block.attachment.freeze
end
@blocks.each { |block| block.attachment.freeze }
end
def unknown_tag(tag, markup, tokens)