diff --git a/lib/liquid/expression.rb b/lib/liquid/expression.rb index d860e20b..c9a50fd1 100644 --- a/lib/liquid/expression.rb +++ b/lib/liquid/expression.rb @@ -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