mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-20 11:20:41 -07:00
Broken warnings implementation.
This commit is contained in:
@@ -56,6 +56,21 @@ module Liquid
|
||||
assert_missing_delimitation!
|
||||
end
|
||||
|
||||
# warnings of this block and all sub-tags
|
||||
def warnings
|
||||
all_warnings = []
|
||||
all_warnings.concat(@warnings) if @warnings
|
||||
|
||||
return all_warnings unless @nodelist
|
||||
@nodelist.each do |node|
|
||||
p node
|
||||
node_warns = node.respond_to?(:warnings) ? node.warnings : nil
|
||||
all_warnings.concat(node_warns) if node_warns
|
||||
end
|
||||
|
||||
all_warnings
|
||||
end
|
||||
|
||||
def end_tag
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user