fix if tag parsing with expressions starting with and/or

This commit is contained in:
James MacAulay
2010-07-07 16:48:23 -04:00
parent d53a4e1834
commit ff829e7996
2 changed files with 15 additions and 1 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ module Liquid
class If < Block
SyntaxHelp = "Syntax Error in tag 'if' - Valid syntax: if [expression]"
Syntax = /(#{QuotedFragment})\s*([=!<>a-z_]+)?\s*(#{QuotedFragment})?/
ExpressionsAndOperators = /(?:and|or|(?:\s*(?!\b(?:and|or)\b)(?:#{QuotedFragment}|\S+)\s*)+)/
ExpressionsAndOperators = /(?:\b(?:and|or)\b|(?:\s*(?!\b(?:and|or)\b)(?:#{QuotedFragment}|\S+)\s*)+)/
def initialize(tag_name, markup, tokens)