mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-18 02:10:41 -07:00
if blocks work with filtered variables
This commit is contained in:
@@ -133,6 +133,9 @@ module Liquid
|
||||
:blank?
|
||||
when 'empty'
|
||||
:empty?
|
||||
# filtered variables
|
||||
when SpacelessFilter
|
||||
filtered_variable(key)
|
||||
# Single quoted strings
|
||||
when /^'(.*)'$/
|
||||
$1.to_s
|
||||
@@ -221,5 +224,9 @@ module Liquid
|
||||
|
||||
object
|
||||
end
|
||||
|
||||
def filtered_variable(markup)
|
||||
Variable.new(markup).render(self)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user