From ca5bc5d75b6328225686c2cdd549a12255954073 Mon Sep 17 00:00:00 2001 From: Nick Jones Date: Wed, 12 Jun 2013 09:13:41 -0700 Subject: [PATCH] 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 --- lib/liquid/tags/if.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/liquid/tags/if.rb b/lib/liquid/tags/if.rb index c376f6c..1202d58 100644 --- a/lib/liquid/tags/if.rb +++ b/lib/liquid/tags/if.rb @@ -19,6 +19,10 @@ module Liquid super end + def nodelist + @blocks.map(&:attachment).flatten + end + def unknown_tag(tag, markup, tokens) if ['elsif', 'else'].include?(tag) push_block(tag, markup)