Allow commas to separate for tag attributes (#1658)

For consistency with tags like the `render` tag, where we actually
prefer to use commas to separate attributes
This commit is contained in:
Dylan Thacker-Smith
2022-11-29 09:00:55 -05:00
committed by GitHub
parent 9ccbf64571
commit c2c6cb2b15
2 changed files with 4 additions and 2 deletions
+3 -2
View File
@@ -98,11 +98,12 @@ module Liquid
@name = "#{@variable_name}-#{collection_name}"
@reversed = p.id?('reversed')
while p.look(:id) && p.look(:colon, 1)
while p.look(:comma) || p.look(:id)
p.consume?(:comma)
unless (attribute = p.id?('limit') || p.id?('offset'))
raise SyntaxError, options[:locale].t("errors.syntax.for_invalid_attribute")
end
p.consume
p.consume(:colon)
set_attribute(attribute, p.expression)
end
p.consume(:end_of_string)