mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-20 03:10:39 -07:00
don't cache literals for Expression parser
This commit is contained in:
@@ -84,6 +84,8 @@ module Liquid
|
|||||||
if (markup.start_with?('"') && markup.end_with?('"')) ||
|
if (markup.start_with?('"') && markup.end_with?('"')) ||
|
||||||
(markup.start_with?("'") && markup.end_with?("'"))
|
(markup.start_with?("'") && markup.end_with?("'"))
|
||||||
return markup[1..-2]
|
return markup[1..-2]
|
||||||
|
elsif LITERALS.key?(markup)
|
||||||
|
return LITERALS[markup]
|
||||||
end
|
end
|
||||||
|
|
||||||
return CACHE[markup] if CACHE.key?(markup)
|
return CACHE[markup] if CACHE.key?(markup)
|
||||||
@@ -96,8 +98,6 @@ module Liquid
|
|||||||
return RangeLookup.parse(Regexp.last_match(1), Regexp.last_match(2))
|
return RangeLookup.parse(Regexp.last_match(1), Regexp.last_match(2))
|
||||||
end
|
end
|
||||||
|
|
||||||
return LITERALS[markup] if LITERALS.key?(markup)
|
|
||||||
|
|
||||||
if (num = parse_number(markup))
|
if (num = parse_number(markup))
|
||||||
num
|
num
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user