don't cache literals for Expression parser

This commit is contained in:
Michael Go
2025-01-07 14:32:07 -04:00
parent 92fa334192
commit a672f3836c
+2 -2
View File
@@ -84,6 +84,8 @@ module Liquid
if (markup.start_with?('"') && markup.end_with?('"')) ||
(markup.start_with?("'") && markup.end_with?("'"))
return markup[1..-2]
elsif LITERALS.key?(markup)
return LITERALS[markup]
end
return CACHE[markup] if CACHE.key?(markup)
@@ -96,8 +98,6 @@ module Liquid
return RangeLookup.parse(Regexp.last_match(1), Regexp.last_match(2))
end
return LITERALS[markup] if LITERALS.key?(markup)
if (num = parse_number(markup))
num
else