Allow question-mark at end of variable name only

This commit is contained in:
Brian Candler
2009-06-06 16:20:34 +01:00
parent cfe3e6f3be
commit f29b9335c5
+2 -2
View File
@@ -29,7 +29,7 @@ module Liquid
TagStart = /\{\%/
TagEnd = /\%\}/
VariableSignature = /\(?[\w\-\.\[\]]\)?/
VariableSegment = /[\w\-]\??/
VariableSegment = /[\w\-]/
VariableStart = /\{\{/
VariableEnd = /\}\}/
VariableIncompleteEnd = /\}\}?/
@@ -44,7 +44,7 @@ module Liquid
AnyStartingTag = /\{\{|\{\%/
PartialTemplateParser = /#{TagStart}.*?#{TagEnd}|#{VariableStart}.*?#{VariableIncompleteEnd}/
TemplateParser = /(#{PartialTemplateParser}|#{AnyStartingTag})/
VariableParser = /\[[^\]]+\]|#{VariableSegment}+/
VariableParser = /\[[^\]]+\]|#{VariableSegment}+\??/
end
require 'liquid/drop'