Disallow filters with no variable in strict mode

This commit is contained in:
Justin Li
2014-10-27 13:34:27 -04:00
parent a8f60ff6b1
commit fcb23a4cd2
2 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ module Liquid
@filters = []
p = Parser.new(markup)
# Could be just filters with no input
@name = p.look(:pipe) ? nil : Expression.parse(p.expression)
@name = Expression.parse(p.expression)
while p.consume?(:pipe)
filtername = p.consume(:id)
filterargs = p.consume?(:colon) ? parse_filterargs(p) : []