mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-29 15:15:19 -07:00
Merge loops
This commit is contained in:
@@ -21,10 +21,10 @@ module Liquid
|
|||||||
def parse(tokens)
|
def parse(tokens)
|
||||||
body = new_body
|
body = new_body
|
||||||
body = @blocks.last.attachment while parse_body(body, tokens)
|
body = @blocks.last.attachment while parse_body(body, tokens)
|
||||||
if blank?
|
@blocks.each do |condition|
|
||||||
@blocks.each { |condition| condition.attachment.remove_blank_strings }
|
condition.attachment.remove_blank_strings if blank?
|
||||||
|
condition.attachment.freeze
|
||||||
end
|
end
|
||||||
@blocks.each { |condition| condition.attachment.freeze }
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def nodelist
|
def nodelist
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ module Liquid
|
|||||||
def parse(tokens)
|
def parse(tokens)
|
||||||
while parse_body(@blocks.last.attachment, tokens)
|
while parse_body(@blocks.last.attachment, tokens)
|
||||||
end
|
end
|
||||||
if blank?
|
@blocks.each do |block|
|
||||||
@blocks.each { |condition| condition.attachment.remove_blank_strings }
|
block.attachment.remove_blank_strings if blank?
|
||||||
|
block.attachment.freeze
|
||||||
end
|
end
|
||||||
@blocks.each { |block| block.attachment.freeze }
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def unknown_tag(tag, markup, tokens)
|
def unknown_tag(tag, markup, tokens)
|
||||||
|
|||||||
Reference in New Issue
Block a user