Skip to content

Commit fc432e2

Browse files
committed
don't cache literals for Expression parser
1 parent c0e45c1 commit fc432e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/liquid/expression.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ def parse(markup)
8484
if (markup.start_with?('"') && markup.end_with?('"')) ||
8585
(markup.start_with?("'") && markup.end_with?("'"))
8686
return markup[1..-2]
87+
elsif LITERALS.key?(markup)
88+
return LITERALS[markup]
8789
end
8890

8991
return CACHE[markup] if CACHE.key?(markup)
@@ -96,8 +98,6 @@ def inner_parse(markup)
9698
return RangeLookup.parse(Regexp.last_match(1), Regexp.last_match(2))
9799
end
98100

99-
return LITERALS[markup] if LITERALS.key?(markup)
100-
101101
if (num = parse_number(markup))
102102
num
103103
else

0 commit comments

Comments
 (0)