mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-20 19:30:47 -07:00
skip TagAttributes scan in for tag when no colon present
This commit is contained in:
@@ -79,8 +79,11 @@ module Liquid
|
|||||||
@reversed = !!Regexp.last_match(3)
|
@reversed = !!Regexp.last_match(3)
|
||||||
@name = "#{@variable_name}-#{collection_name}"
|
@name = "#{@variable_name}-#{collection_name}"
|
||||||
@collection_name = parse_expression(collection_name)
|
@collection_name = parse_expression(collection_name)
|
||||||
markup.scan(TagAttributes) do |key, value|
|
# Only scan for limit:/offset: attributes if markup contains ':'
|
||||||
set_attribute(key, value)
|
if markup.include?(':')
|
||||||
|
markup.scan(TagAttributes) do |key, value|
|
||||||
|
set_attribute(key, value)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
raise SyntaxError, options[:locale].t("errors.syntax.for")
|
raise SyntaxError, options[:locale].t("errors.syntax.for")
|
||||||
|
|||||||
Reference in New Issue
Block a user