mirror of
https://github.com/kemko/liquid.git
synced 2026-01-01 15:55:40 +03:00
Allow an empty variable tag during strict parsing for liquid-c compat (#1320)
This commit is contained in:
committed by
GitHub
parent
866e437c05
commit
ae6bd9f6b0
@@ -63,6 +63,8 @@ module Liquid
|
||||
@filters = []
|
||||
p = Parser.new(markup)
|
||||
|
||||
return if p.look(:end_of_string)
|
||||
|
||||
@name = Expression.parse(p.expression)
|
||||
while p.consume?(:pipe)
|
||||
filtername = p.consume(:id)
|
||||
|
||||
@@ -118,6 +118,10 @@ class ParsingQuirksTest < Minitest::Test
|
||||
end
|
||||
end
|
||||
|
||||
def test_blank_variable_markup
|
||||
assert_template_result('', "{{}}")
|
||||
end
|
||||
|
||||
def test_contains_in_id
|
||||
assert_template_result(' YES ', '{% if containsallshipments == true %} YES {% endif %}', 'containsallshipments' => true)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user