mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-12 15:30:39 -07:00
Fixed some parse errors thanks to Daniel Sheppard [Closes #6]
This commit is contained in:
+2
-1
@@ -33,7 +33,8 @@ module Liquid
|
||||
VariableStart = /\{\{/
|
||||
VariableEnd = /\}\}/
|
||||
VariableIncompleteEnd = /\}\}?/
|
||||
QuotedFragment = /"[^"]+"|'[^']+'|[^\s,\|]+/
|
||||
QuotedString = /"[^"]+"|'[^']+'/
|
||||
QuotedFragment = /#{QuotedString}|(?:[^\s,\|'"]|#{QuotedString})+/
|
||||
StrictQuotedFragment = /"[^"]+"|'[^']+'|[^\s,\|,\:,\,]+/
|
||||
FirstFilterArgument = /#{FilterArgumentSeparator}(?:#{StrictQuotedFragment})/
|
||||
OtherFilterArgument = /#{ArgumentSeparator}(?:#{StrictQuotedFragment})/
|
||||
|
||||
@@ -13,8 +13,8 @@ module Liquid
|
||||
# <div class="green"> Item five</div>
|
||||
#
|
||||
class Cycle < Tag
|
||||
SimpleSyntax = /#{Expression}/
|
||||
NamedSyntax = /(#{Expression})\s*\:\s*(.*)/
|
||||
SimpleSyntax = /^#{Expression}/
|
||||
NamedSyntax = /^(#{Expression})\s*\:\s*(.*)/
|
||||
|
||||
def initialize(tag_name, markup, tokens)
|
||||
case markup
|
||||
@@ -27,7 +27,6 @@ module Liquid
|
||||
else
|
||||
raise SyntaxError.new("Syntax Error in 'cycle' - Valid syntax: cycle [name :] var [, var2, var3 ...]")
|
||||
end
|
||||
|
||||
super
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user