mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-12 23:40:45 -07:00
Allow question-mark at end of variable name only
This commit is contained in:
+2
-2
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user