mirror of
https://github.com/Shopify/liquid.git
synced 2026-10-03 09:05:13 -07:00
Correct if-statement nodelist.
The nodelist returned by all tags is a list of containing nodes, except for the if tag. This correct that inconsistency
This commit is contained in:
@@ -19,6 +19,10 @@ module Liquid
|
|||||||
super
|
super
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def nodelist
|
||||||
|
@blocks.map(&:attachment).flatten
|
||||||
|
end
|
||||||
|
|
||||||
def unknown_tag(tag, markup, tokens)
|
def unknown_tag(tag, markup, tokens)
|
||||||
if ['elsif', 'else'].include?(tag)
|
if ['elsif', 'else'].include?(tag)
|
||||||
push_block(tag, markup)
|
push_block(tag, markup)
|
||||||
|
|||||||
Reference in New Issue
Block a user