Commits

Grant Eagon  committed f4351e6 Draft

Better validation for use of the "in" keyword. Now ignores quoted strings.

  • Participants
  • Parent commits 2d94f34

Comments (0)

Files changed (2)

File Syntaxes/HTML (Liquid).tmLanguage

 						<key>name</key>
 						<string>constant.language.liquid</string>
 					</dict>
-					<!-- "in" used in logic tag [instead of contains] -->
+					<!-- "in" used in logic tag [instead of contains, not inside double quotes] -->
 					<dict>
 						<key>captures</key>
 						<dict>
 							</dict>
 						</dict>
 						<key>match</key>
-						<string>(?&lt;=if|unless|elsif)[^%}]+[a-zA-Z0-9\-\w]+\s(in)\s[a-zA-Z0-9\-\w]+</string>
+						<string>(?&lt;=if|unless|elsif)[^%}]+[a-zA-Z0-9\-\w]+\s(in(?=([^'"]*['"][^'"]*['"])*[^'"]*$))\s[a-zA-Z0-9\-\w]+</string>
 					</dict>
 					<!-- illegal equality test in logic tag [broken] -->
 					<dict>

File Syntaxes/HTML (Liquid).tmLanguage.cache

Binary file modified.